0
$\begingroup$

Rosanswers logo

Hi everyone,

I am looking at wstool to systematically update my local git repositories, but I am wondering how to manage multiple branches of the same repository.

For example, if I want wstool to help me pull the latest changes from the navigation stack on both the hydro-devel branch and the navigation-1.8 branch, and add them to the respective branches of my local navigation stack repository, how can I do that?

From what I understand, if you create one 'navigationstack' entry in your .rosinstall file, you can only associate one --version tag to it.

Thanks,

Edit : to clarify my initial question : I have used wstool update to set up or update a target (robot) in a specific configuration, in which case we only need to pull one branch for each repository we need.

Since I find it a convenient tool, I was wondering if it could also facilitate the task of pulling changes from multiple branches for each repository, as you are coding on your development machine for instance.

Let's say a colleague has started development on a new repository Rep_A and he has already created three branches Branch_A, Branch_B and Branch C. Would it be possible, by configuring wstool, to clone Rep_A on your machine, create local branches tracking the 3 remote branches and pull changes on all of them? Something like this I guess : http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches


Originally posted by al-dev on ROS Answers with karma: 883 on 2014-10-24

Post score: 1


Original comments

Comment by 2ROS0 on 2014-10-24:
Can't you have two navigation stack entries in your .rosinstall ?

Comment by al-dev on 2014-10-24:
Yes but how do you link them to the same local git repository (i.e same folder)?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

wstool is a tool for managing workspaces and what branches are checked out. Any repository can only have one branch or tag checked out.

After you've pulled the repository all the branches will usually already be present.

Edit:

Yes, wstool is not designed to provide the sort of multiple branch management that you are looking for. It's designed to make sure your checkout is in the expected state. And does not keep track of other branches.


Originally posted by tfoote with karma: 58457 on 2014-10-25

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by al-dev on 2014-10-26:
Right, so the wstool update command cannot do something like "checkout branch A then pull branch A then checkout branch B then pull branch B then checkout branch C .... " ?

Just wondering, is there an easy tool to do this beside scripting?

Comment by tfoote on 2014-10-26:
Please edit your question to clarify exactly what do you want to do, not how you think you want to do it. Your above sequence does a bunch of things that then get reverted by a later checkout.

Comment by al-dev on 2014-10-27:
I have edited the question. Thanks for your help.

Edit : Thanks @tfoote, that's precisely what I wanted to know.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.