all bzr plugins use TREE_ROOT as their root-id as does bzr itself

Bug #965403 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Undecided
Unassigned

Bug Description

Weird stuff, I wanted to merge bzr-webdav into bzr:

$ bzr branch lp:bzr merging-webdav
Branched 6511 revisions.
$ cd merging-webdav/bzrlib/plugins
Branched 74 revisions.
$ bzr branch lp:bzr-webdav webdav
bzr join webdav
bzr: ERROR: Cannot join webdav. Trees have the same root

Yeah, sure, the other has bells on it ?

$ cd webdav
$ bzr file-id .
TREE_ROOT

err

$ cd ../../..
$ bzr file-id .
TREE_ROOT

Doh !

Not sure what we want to do there... I realise there was no point in
changing the root-id when we upgraded to rich-root formats but ... should we
have a way to *change* a root-id ?

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
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 03:21:16PM -0000, Vincent Ladeuil wrote:
> Public bug reported:
>
> Weird stuff, I wanted to merge bzr-webdav into bzr:
>
> $ bzr branch lp:bzr merging-webdav
> Branched 6511 revisions.
> $ cd merging-webdav/bzrlib/plugins
> Branched 74 revisions.
> $ bzr branch lp:bzr-webdav webdav
> bzr join webdav
> bzr: ERROR: Cannot join webdav. Trees have the same root
>
> Yeah, sure, the other has bells on it ?
>
> $ cd webdav
> $ bzr file-id .
> TREE_ROOT
>
> err
>
> $ cd ../../..
> $ bzr file-id .
> TREE_ROOT
>
> Doh !
>
> Not sure what we want to do there... I realise there was no point in
> changing the root-id when we upgraded to rich-root formats but ... should we
> have a way to *change* a root-id ?
I think so. I think having a way of refreshing a file id of a
particular file (not just the root) would be useful.

Cheers,

Jelmer

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

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?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

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

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

On Tue, Mar 27, 2012 at 4:58 AM, Jelmer Vernooij
<email address hidden> wrote:
> 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.

Right, so I think a bug specifically about the bzr plugins is probably
invalid. The valid bug is that you can't merge trees created before
root ids were introduced -- I think there is a bug for that and this
is a dupe of it.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers