AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT')) making a lightweight checkout

Bug #830947 reported by Nicholas Allen
86
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Bazaar
Status tracked in Trunk
2.4
Fix Released
High
John A Meinel
2.5
Fix Released
High
John A Meinel
Trunk
Fix Released
High
John A Meinel

Bug Description

bzr: WARNING: bzrlib version doesn't match the bzr program.
This may indicate an installation problem.
bzrlib from ['/usr/lib/python2.7/dist-packages/bzrlib'] is version (2, 4, 0, 'final', 0)
bzr: ERROR: exceptions.AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/nick/.bazaar/plugins/externals/commands.py", line 228, in run
    super(cmd_checkout, self).run(**kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1408, in run
    accelerator_tree, hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 1454, in create_checkout
    hardlink=hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 1173, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 1562, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 2522, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 2638, in _build_tree
    precomputed_delta=precomputed_delta)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 1756, in apply
    self._tree.apply_inventory_delta(inventory_delta)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 1317, in apply_inventory_delta
    state.update_by_delta(changes)
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 1431, in update_by_delta
    self._apply_insertions(insertions.values())
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 1483, in _apply_insertions
    path_utf8=path_utf8)
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 3158, in update_minimal
    raise AssertionError('not present: %r', entry_key)
AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

Related branches

Revision history for this message
Nicholas Allen (nick-allen) wrote :

Cannot add crash report as Launchpad does nothing when I try (sorry).

Revision history for this message
Vincent Ladeuil (vila) wrote :

> bzr: WARNING: bzrlib version doesn't match the bzr program.
> This may indicate an installation problem.

Can you double-check your installation ? Including your PATH and your PYTHONPATH ?

Changed in bzr:
status: New → Incomplete
Revision history for this message
Nicholas Allen (nick-allen) wrote :

You can disregard that warning as it happened also when completely removing bzr from package manager and then installing from source for 2.3.4. I just pasted in the wrong stack trace from an earlier attempt to downgrade that I didn't do correctly. I get the same error even when I don't see this warning as a result of successfully downgrading to 2.3.4. I tried to attach the bug report when this error was not there but launchpad also seems broken at the moment and attaching files does nothing. I

Revision history for this message
Nicholas Allen (nick-allen) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

bzr checkout --lightweight ~/bzr/trunk /tmp/bzr-checkout does work for me, so there must be something more subtle about it - perhaps it's specifically to do with a lightweight checkout of a remote branch (which we wouldn't normally recommend).

summary: - Bazaar 2.4 crashes when trying to do a lightweight checkout
+ AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))
+ making a lightweight checkout
Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → High
Revision history for this message
Martin Pool (mbp) wrote :

A lightweight checkout over ssh from a remote server also works for me. That error may be enough to go from but it's not immediately obvious to me why it would occur, so if you can show how to reproduce it with a small history that would be good.

Revision history for this message
John A Meinel (jameinel) wrote :

This is saying that the root id is missing. Is he trying to checkout a branch with no history? (Thus trying to checkout the 'null:' revision). Or maybe it is trying to mutate the state to remove the tree root.

This is specifically triggering during "bzr checkout" so my guess is that it has to do with checking out a branch with no history.

bzr init-repo --no-trees repo
bzr init repo/branch
bzr co --lightweight repo/branch work

However, I just tried that, and it worked just fine.

Revision history for this message
Nicholas Allen (nick-allen) wrote :

The branch definitely has history. If I do a lightweight checkout with 2.3.4 then it works fine but with 2.4.0 I always get this error.

Revision history for this message
Nicholas Allen (nick-allen) wrote :

Seems the problem might have nothing to do with being lightweight or not. I just branched using "bzr branch" and got this error when branching into a shared repository.

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Yann Golanski (yann-kierun) wrote :

Another report of this bug on Fedora 16:

Checking out bzr://bzr/rprs/fedora_15 to rprs-fc15
bzr: ERROR: exceptions.AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1408, in run
    accelerator_tree, hardlink)
  File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 1455, in create_checkout
    hardlink=hardlink)
  File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 1173, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 1562, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 2522, in build_tree
    delta_from_tree)
  File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 2638, in _build_tree
    precomputed_delta=precomputed_delta)
  File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 1756, in apply
    self._tree.apply_inventory_delta(inventory_delta)
  File "/usr/lib64/python2.7/site-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 1317, in apply_inventory_delta
    state.update_by_delta(changes)
  File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 1432, in update_by_delta
    self._apply_insertions(insertions.values())
  File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 1484, in _apply_insertions
    path_utf8=path_utf8)
  File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 3159, in update_minimal
    raise AssertionError('not present: %r', entry_key)
AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

bzr 2.4.2 on python 2.7.2 (Linux-3.2.9-1.fc16.x86_64-x86_64-with-
    fedora-16-Verne)
arguments: ['/usr/bin/bzr', 'co', 'bzr://bzr/rprs/fedora_15', 'rprs-fc15']
plugins: bash_completion[2.4.2], bzrtools[2.4.0], changelog_merge[2.4.2],
    launchpad[2.4.2], netrc_credential_store[2.4.2], news_merge[2.4.2],
    qbzr[0.21.1], weave_fmt[2.4.2]

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 830947] Re: AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT')) making a lightweight checkout
Download full text (3.2 KiB)

On Thu, Mar 08, 2012 at 10:30:38AM -0000, Yann Golanski wrote:
> Another report of this bug on Fedora 16:
>
>
> Checking out bzr://bzr/rprs/fedora_15 to rprs-fc15
> bzr: ERROR: exceptions.AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))
>
> Traceback (most recent call last):
> File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 946, in exception_to_return_code
> return the_callable(*args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 721, in run
> return self._operation.run_simple(*args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
> self.cleanups, self.func, *args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
> result = func(*args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1408, in run
> accelerator_tree, hardlink)
> File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 1455, in create_checkout
> hardlink=hardlink)
> File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 1173, in create_workingtree
> accelerator_tree=accelerator_tree, hardlink=hardlink)
> File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 1562, in initialize
> delta_from_tree=delta_from_tree)
> File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 2522, in build_tree
> delta_from_tree)
> File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 2638, in _build_tree
> precomputed_delta=precomputed_delta)
> File "/usr/lib64/python2.7/site-packages/bzrlib/transform.py", line 1756, in apply
> self._tree.apply_inventory_delta(inventory_delta)
> File "/usr/lib64/python2.7/site-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
> return unbound(self, *args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 1317, in apply_inventory_delta
> state.update_by_delta(changes)
> File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 1432, in update_by_delta
> self._apply_insertions(insertions.values())
> File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 1484, in _apply_insertions
> path_utf8=path_utf8)
> File "/usr/lib64/python2.7/site-packages/bzrlib/dirstate.py", line 3159, in update_minimal
> raise AssertionError('not present: %r', entry_key)
> AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))
>
> bzr 2.4.2 on python 2.7.2 (Linux-3.2.9-1.fc16.x86_64-x86_64-with-
> fedora-16-Verne)
> arguments: ['/usr/bin/bzr', 'co', 'bzr://bzr/rprs/fedora_15', 'rprs-fc15']
> plugins: bash_completion[2.4.2], bzrtools[2.4.0], changelog_merge[2.4.2],
> launchpad[2.4.2], netrc_credential_store[2.4.2], news_merge[2.4.2],
> qbzr[0.21.1], weave_fmt[2.4.2]

What is the branch you're try...

Read more...

Revision history for this message
Yann Golanski (yann-kierun) wrote :

@Jelmer Vernooji, the branch was created using bzr bzr://sever/repo local-repo. It is our main product which is quiet large. Note that the error does not happen under 2.3.4

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Something New?

Just to try...

download this branch on ubuntu 11.10 lp:~vauxoo/+junk/rstparser you will see the error (bzr 2.4).. It happens JUST with this branch.

On my log: from the origin of this branch with bzr 2.1.4 ....

Log of my branch i saw this in 2 revnos:

------------------------------------------------------------
revno: 10
committer: Nhomar Hernandez <email address hidden>
branch nick: tools-openerp-vauxoo
timestamp: Sat 2012-02-04 16:48:14 -0500
message:
  <85><9B>�[RENAME]
------------------------------------------------------------
revno: 9
committer: Nhomar Hernandez <email address hidden>
branch nick: tools-openerp-vauxoo
timestamp: Sat 2012-02-04 16:47:42 -0500
message:
  <85><9B>�<85><9B>�[ADD] NEw Proyect to build a tool to make simple tasks over openerp-servers
------------------------------------------------------------

Look the charts wrong showed....

can it be the problem?

regards.

Revision history for this message
Nicholas Allen (nick-allen) wrote :

Any updates on this bug? It's been there so long and is marked as high and is causing a lot of problems for us.

Revision history for this message
Robert Boggs (rab-isotek) wrote :

I also have this problem and have tried a few things to narrow down what causes it.
We have a central server with a shared repository that holds quite a few branches.

There seems to be just one branch in our repository that has this problem. Most other branches I have tried are fine.
For that branch bzr branch and bzr checkout fail in this way from where ever I try.
I have tried normal remote access to our server.
I have also taken a local filesystem type copy of the repository onto my development machine and tried local branching from outside the repository and branching within the repository with various bzr versions.

These tests have been tried with bzr 2.3.4, 2.4.2 and 2.5.1. Version 2.3.4 always works, the other two always fail on this branch in particular. They all work in all scenarios on other branches in the same repository.

I can create a new shared repository and branch this troublesome branch into it using 2.3.4. I can not then branch or check out from that branch in the new repository with the newer versions of bzr.

Interestingly, I can sit in any of the repositories and do bzr init foo; cd foo; bzr pull bad-branch and that works without errors with any revision. However, I then cannot branch from that foo branch.

I have run bzr check and bzr reconcile with no improvement. I have done this on the copy of our server repo, the new repo mentioned above and my usual development shared repo on my machine and tried these tests again afterwards .

The branch that fails has a long history. It was originally created in I think a 0.92 format repo with rich-roots. The branch was brought in using bzr-svn. The repository has been upgraded twice. To the 1.14-rich-root format and more recently to 2a.

I have tried a superficial comparision of the dirstate module in 2.3.4 and 2.5.1 and can't see any real difference in the code around the area that throws the exception.

I am wondering if the repository data for the troublesome branch is damaged somehow and the damage is being blindly copied around by the older bzr version, but the newer ones complain.

Is there anything I can do to investigate further?

Many thanks

Revision history for this message
Richard Watts (rrw) wrote :

You may be having the same problem I am - in my case, I have a repository which was created a very long time ago (pre - pack-0.92).

It has been upgraded (to -2a), but some deltas still cite a fileid of TREE_ROOT.

The trouble is that when we get to merging those deltas into the dirstate, we discover that there is a path '', but that it has no TREE_ROOT fileid associated (because that was removed during the upgrade).

I _think_ that the correct response is to simply not throw in this case, since the only problem is that a delta is citing a root which must be there, albeit under a different fileid.

If you were to branch from https://code.launchpad.net/~rrw/bzr/830947-tree-root-exception , you might find that your problem goes away - I'd be interested to know if it does? (mine did)

Revision history for this message
Robert Boggs (rab-isotek) wrote :

Sorry to take so long to get back on this: I broke my leg on holiday.

I have tried the branch you suggest and it does cure the problem.
I have tried a similar variety of operations as in my earlier post and all now work.
So, that includes creating branches, checkouts and lightweight checkouts inside and outside the repository containing the problem branch. All the external operations were tried both into a new shared repository and into stand alone items. I also made branches and checkouts within the new repository and from that to further external stand alone items.

So that's great. What might be the future for this patch? I can apply it by hand to future updates, of course, but might it get into the main line?

Many thanks

Revision history for this message
tsdh (tassilo) wrote :

The same problem happens when trying to checkout the Emacs elpa branch using bzr 2.5.1.

  % bzr init-repo emacs
  % cd emacs
  % bzr branch bzr://bzr.savannah.gnu.org/emacs/elpa elpa
  bzr: ERROR: exceptions.AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

With Richard's branch, I don't get an error.

However, I'd like to stick to the released bzr version installed by the package manager instead of having to maintain a separate version. So is it ok to do the initial "bzr branch" with Richard's version and then work on that branch using the released bzr 2.5.1?

Revision history for this message
Rüdiger Sonderfeld (ruediger-c-plusplus) wrote :
Download full text (4.1 KiB)

I had the same issue with elpa and bzr 2.6p

$ bzr branch http://bzr.savannah.gnu.org/r/emacs/elpa
bzr: ERROR: exceptions.AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1141, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1508, in run
    source_branch=br_from)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 367, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 435, in _sprout
    hardlink=hardlink, from_branch=result_branch)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 907, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 1565, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 2543, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 2659, in _build_tree
    precomputed_delta=precomputed_delta)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transform.py", line 1747, in apply
    self._tree.apply_inventory_delta(inventory_delta)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 1320, in apply_inventory_delta
    state.update_by_delta(changes)
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 1387, in update_by_delta
    self._apply_insertions(insertions.values())
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 1439, in _apply_insertions
    path_utf8=path_utf8)
  File "/usr/lib/python2.7/dist-packages/bzrlib/dirstate.py", line 3116, in update_minimal
    raise AssertionError('not present: %r', entry_key)
AssertionError: ('not present: %r', StaticTuple('', '', 'TREE_ROOT'))

bzr 2.6b2 on python 2.7.3 (Linux-3.5.0-...

Read more...

Revision history for this message
John A Meinel (jameinel) wrote :

I dug into this for the elpa branch. I'm pretty sure there is a bug in bzr when it encounters a file named TREE_ROOT. (It seems to be assuming it should be at the root of the tree ('', '', 'TREE_ROOT') would be the meta-node at '/'.)

There is a "TREE_ROOT" node, which is packages/f90-interface-browser.

If you simply change the file-id for that directory, 'bzr co' works fine again. So the workaround at least is:

bzr mv packages/f90-interface-browser x
bzr mkdir packages/f90-interface-browser
bzr mv x/* packages/f90-interface-browser
bzr rm x
bzr commit -m "change the file-id for f90-interface-browser"

After doing the above, I can checkout the elpa branch without any problems.

I'm guessing we have some compatibility code for upgrades/etc which *shouldn't* be triggering for elpa, but is triggering accidentally.

But the workaround is pretty easy, and will be perfectly compatible with all bzr clients (so you won't need a new bzr just to work with the elpa branch.)

Revision history for this message
John A Meinel (jameinel) wrote :

I'm trying to think if Robert's fix is the correct one. We might want to merge it anyway, but I have the feeling this is just layering a workaround on top of a workaround.

We have an issue that ('', '', "TREE_ROOT") is being created by the checkout code. And then when iterating we see TREE_ROOT show up in a subdirectory, and we think there is a problem with that.

At a top level the rough breakdown is:
Dirstate.initialize() always creates a checkout with root id of "TREE_ROOT".
In DirStateWorkingTreeFormat.initialize() we have this code:
                basis_root_id = basis.get_root_id()
                if basis_root_id is not None:
                    wt._set_root_id(basis_root_id)
                    wt.flush()

So *if* the basis tree has a root_id, we force the root_id of the newly created tree to the same root id.

Once _set_root_id has been called, we can see "('', '', 'TREE_ROOT')" in id_index["TREE_ROOT"], even though arguably that entry never actually existed.

And tracing into _set_root_id it calls set_path_id() which has this lovely chunk in it:
        # XXX: This was added by Ian, we need to make sure there
        # are tests for it, because it isn't in bzr.dev TRUNK
        # It looks like the only place it is called is in setting the root
        # id of the tree. So probably we never had an _id_index when we
        # don't even have a root yet.
        if self._id_index is not None:
            self._add_to_id_index(self._id_index, entry[0])

That XXX leads me to believe that we don't actually want to add the entry to the index. Note that 'set_path_id()' has explicit logic for checking that the path is the root (if len(path): raise NotImplementedError)).

(I'm the one that wrote that XXX, but that was 2 years ago.)

I think the real fix is to just remove that code. I'll try running the test suite with and without it. If nothing actually fails, then I think the bug is that I merged Ian's change without fully vetting the fallout from it.

Vincent Ladeuil (vila)
no longer affects: bzr/2.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.