[MERGE] Unique roots for bzr
John Arbash Meinel
john at arbash-meinel.com
Fri Oct 13 22:52:49 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
> John Arbash Meinel wrote:
...
> Anyhow, why does a doctest matter? Especially given that it's said
> 'TREE_ROOT-12345678-12345678' since July 2005?
It has nothing to do with the doctest. It was just something that
reminded me of this fact, which was something I wanted to bring up. I
admit it isn't super critical, and we should change escaping in other
ways. But I did see that using a default id of TREE_ROOT-foo for new
trees is not as nice as using 'tree_root-foo'.
Further, I don't think there are Knit2 format repositories in real use
(yet), so I think we can change it without breaking anything. But yes,
that is a different thing. I was just discussing it. The doctest is fine
as is.
...
>>> v- This seems pretty weird, what are you trying to do here?
>
> Avoid test failures from tests that assumed one blank tree was
> equivalent to another blank tree.
>
> I can't really say it better than the comment:
> # If we happen to have a tree, we'll guarantee everything
> # except for the tree root is the same.
^- I'm not going to stick on this, but it does seem better to fix the
tests, rather than have trees evaluate to equal when they aren't.
> Unfortunately, MemoryTree doesn't have a persistent inventory-- it's
> zapped on unlock. So every time we locked, we'd get a different root
> id. I don't understand why it's written this way.
Well, isn't that a problem with the inventory? Yes we get a new
inventory each time, but IIRC it reads it from the branch. I think it
was an attempt to move in the direction we want for WorkingTree's, where
we don't load the inventory if we don't have to, and operations flush it
to disk when unlocked, rather than each operation reading it, modifying
it, and writing it out.
>
>>> So a few comments, but I think this is mergable.
>
> I've attached a diff of my changes due to your review.
>
> Aaron
It looks fine to me. I think it is better than what we have, so I think
it should be merged for 0.12. I'm a little concerned about the tree
comparisons, but that is it.
If this email doesn't reach you until too late, I'll still try to merge
it before I release 0.12rc1.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFMAqwJdeBCYSNAAMRAp8rAJ9t8+OGkp94Jit5F4tpPmLsX0fEgACfeDcg
cr2KOZnAHnVIW+S39ImPM3A=
=gdEx
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list