Moving Branches with Bazaar
A few months ago I started using Bazaar for all my personal and commercial projects. I moved a bunch of repositories over from Subversion either by means of a conversion plugin or, if I didn’t need the history, just a direct export.
Bazzar is really flexible. So much so that its a bit difficult to know how to approach some simple tasks. One that I’ve grappled with a few times is moving an existing branch to a new repository while keeping the history. I tried using reconfigure and switch but both always created a total mess for me. The best way I’ve found to do this is to simply push your branch to the new location. Simple, I know, but it was not exactly the first thing that came to my mind (perhaps because I’m not so smart).
My existing repository and branch:
/local/project
The destination structure (trunk is the branch):
/remote/project/trunk
All that it takes is a simple
bzr push /remote/project/trunk
then to get a fresh checkout with all the right settings:
bzr co /remote/project/trunk /local/project_trunk
Would love to know if there’s a better way as there always seems to be.