Comment 3 for bug 965403

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 965403] [NEW] all bzr plugins use TREE_ROOT as their root-id as does bzr itself

On Mon, Mar 26, 2012 at 05:48:00PM -0000, Alexander Belchenko wrote:
> Vincent Ladeuil пишет:
> > $ bzr branch lp:bzr-webdav webdav
> > bzr join webdav
> > bzr: ERROR: Cannot join webdav. Trees have the same root
>
> See also https://bugs.launchpad.net/bzr/+bug/370710
> which was mentioned on stackoverflow:
> http://stackoverflow.com/questions/9849466/how-to-combine-repositories-into-a-single-one-in-bazaar
>
> And I don't think this is great.
>
> Do I understand it correctly: the problem occurs only with rich-root
> formats?
Not really. join can only be used with rich-root formats anyway (it
can't join another tree that doesn't have a root).

The problem is that branches that were created with older versions of
bzr and were later upgraded to a rich root format will all have a tree
root with the file id "ROOT_ID". Two files with the same file id can't
exist in the same tree, so if you try to join two such trees you will
hit an error. An workaround is to change the root file id of one of
them.

Trees created in a rich root format immediately will have a
unique root id.

Cheers,

Jelmer