Ask Your Question
1

How to clone with proper branch options using wstool

asked 2017-01-24 07:53:12 -0600

pallavbakshi gravatar image

Using git, I can do:

git clone --version indigo https://github.com/xxx to get the correct branch from a particular repo. How can I achieve the same result using wstool?

wstool wiki

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-24 08:50:14 -0600

Thomas D gravatar image

The easiest way is to create a rosinstall file and use the version tag. For your single example repository the example.rosinstall file would look like:

-git:
    uri: https://github.com/xxx
    local-name: yyy
    version: indigo

Note that the local name is typically just the repository name without the organization name, but you are free to organize your repositories into any structure you like (including subdirectories).

Once you have an example.rosinstall file you would add the repository to your workspace by going to the src/ directory and using wstool to merge in additional rosinstall files:

wstool merge example.rosinstall

This will automatically populate the .rosinstall file in the src/ directory of your workspace.

Another option (that is discouraged) is to manually edit the .rosinstall file in the src/ directory of your workspace. However, that is an auto-generated file and your manual edits may be overwritten at a later time which can lead to confusion, which is why it is discouraged.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-01-24 07:53:12 -0600

Seen: 1,067 times

Last updated: Jan 24 '17