ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to manage multiple branches of the same git repository with wstool?

asked 2014-10-24 20:02:42 -0500

al-dev gravatar image

updated 2014-10-27 03:55:42 -0500

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/10...

edit retag flag offensive close merge delete

Comments

Can't you have two navigation stack entries in your .rosinstall ?

2ROS0 gravatar image 2ROS0  ( 2014-10-24 20:50:07 -0500 )edit

Yes but how do you link them to the same local git repository (i.e same folder)?

al-dev gravatar image al-dev  ( 2014-10-24 20:54:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-10-25 22:21:53 -0500

tfoote gravatar image

updated 2014-10-27 14:19:35 -0500

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.

edit flag offensive delete link more

Comments

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?

al-dev gravatar image al-dev  ( 2014-10-26 00:12:45 -0500 )edit

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.

tfoote gravatar image tfoote  ( 2014-10-26 14:44:32 -0500 )edit

I have edited the question. Thanks for your help.

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

al-dev gravatar image al-dev  ( 2014-10-27 03:56:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-24 20:02:42 -0500

Seen: 881 times

Last updated: Oct 27 '14