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

move/copy workspace

asked 2015-03-18 16:49:13 -0600

brice rebsamen gravatar image

is there a tool to copy or move a workspace that would minimize rebuilding time?

example: I have lots of repos in my workspace, rebuilding from scratch takes 15 minutes. Plus there is a lot of test data that takes a long time to download.

I would like to be working on multiple issues at the same time, i.e. I work on issue 1 and while somebody else is reviewing my pull request I would like to work on issue 2, etc. I want to be able to switch back and forth quickly between those 2 code bases.

Working with branches and switching between them is the simple solution, but it has drawbacks as well: while I am in the middle of making my changes, I have a lot on uncommited changes, I need to stash them, switch branch, rebuild, etc...

working with multiple workspaces is great, but then to initially create the workspace is a drag because of the build and download time

So I'd like to be able to copy workspace for issue 1 as a new workspace for issue 2. This way, after I switch branches and make some code modifications, it recompiles quickly.

I tried a simple workspace copy and edited the CMakeCache to switch the workspace root folder, but then when I compiled it basically recompiled from scratch...

I'm sure I am not the first one to think about this, so I was hoping that there might be a tool just for that...

edit retag flag offensive close merge delete


What tool are you using to build with?

William gravatar image William  ( 2015-03-18 19:38:16 -0600 )edit


brice rebsamen gravatar image brice rebsamen  ( 2015-03-18 20:01:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-18 19:38:58 -0600

William gravatar image

updated 2015-03-18 19:44:30 -0600

EDIT: To answer your question directly, no I don't think there are any tools like that.

Can you just:

  • Create a new workspace
  • Clone/copy and change branches for the packages you are changing and
  • Symlink from the other workspace any packages which depend on it?
  • Then in a new terminal source the first workspace and build the second one you just constructed?

This way you only have to build the package your changing and its dependents, which you have to rebuild anyways. At least you don't have to rebuild the packages which the package you are changing depends on.

Also, if you're not using ccache ( ), you should, that will help on repeat compiles.

edit flag offensive delete link more



+1 on ccache. I use it all the time. And the combination ccache and distcc makes things even faster.

gvdhoorn gravatar image gvdhoorn  ( 2015-03-19 09:48:21 -0600 )edit

Question Tools

1 follower


Asked: 2015-03-18 16:49:13 -0600

Seen: 1,967 times

Last updated: Mar 18 '15