Newbie: combine repositories?

Talden talden at
Sun Feb 15 03:50:47 GMT 2009

I think this does something of what you want.

Merge each of the two branches into a new branch that is not related
to either.  The merged revisions will retain history. I would do it as
a new branch so that both lines of ancestry come in clearly as merges
since any overlap will have to pick file-ids (and therefore history)
from one line or the other (as I understand it - hey I'm a Bazaar
newbie too).

1. Create the new branch
    $ bzr init new

2. Create an initial commit in the new branch (needed for reasons
internal to bzr to allow committing the merges)
    $ bzr commit --unchanged -m "base commit for merging source branches)"

3. merge the branches (something like as follows)
    $ bzr merge -r 0..head src1
    $ bzr merge -r 0..head src2

If there are overlapping paths in src1 and src2 you will need to
resolve conflicts in the src2 merge.  I think there are tricks with
file-ids in the merge command to help with matching.


More information about the bazaar mailing list