[BUG] spurious tree root changes in workingtree2 and 3

Robert Collins robertc at robertcollins.net
Thu Aug 23 09:21:27 BST 2007


I have a workingtree implementation test that does the following

    def test_last_revision(self):
        tree = self.make_branch_and_tree('tree')
        rev_id1 = tree.commit('commit')
        # now make a branch
        tree2 = tree.bzrdir.sprout('tree2').open_workingtree()
        # do a commit
        tree2.commit('no-op')
        def check_root(tree):
            broken = tree.basis_tree()
            broken.lock_read()
            try:
                self.assertEqual(rev_id1,
                  broken.inventory[broken.path2id('')].revision)
            finally:
                broken.unlock()
        check_root(tree)
        check_root(tree2)

This fails only on workingtree2 and 3, but this may also be failing on
dirstate when the backing repo is a non-subtrees one. I don't know if
that is the case or not.

I've filed bug 134211 on this, personally I think its fairly important -
we're generating lots of unnecessary knit records for the root.

It made my iterator for commit fail until I figured out it wasn't in my
code - I can work around it in the tests if needed; but perhaps fixing
this is the right approach.

Anyone have thoughts/suggestions on where it probably lies?

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070823/e7b4f861/attachment.pgp 


More information about the bazaar mailing list