[MERGE] Improve NestedTrees test coverage

Aaron Bentley aaron at aaronbentley.com
Fri Apr 24 22:13:11 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

This is a follow-on patch, requested by Ian, to increase the test
coverage of NestedTrees.

In the process, I discovered that iter_pathinfo_by_tree was giving the
wrong results in some cases.  So I went with a much simpler,
less-optimized implementation.  It's not clear to me whether optimizing
would provide tangible benefits, nor is it clear what algorithms would
provide best optimization, so I think it's best not to optimize it.

It was also an opportunity to think about the behaviour of get_path_info
with regard to tree-references.  Since it's easy to traverse from a tree
into a contained tree, but not the reverse, I decided to always return
the tree that contains the tree-reference, not the tree that the
tree-reference points to.

Aaron



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknyK2cACgkQ0F+nu1YWqI0sbQCeMxO5lDSELzIK1lq8VZhMZAw3
xzwAnRqEAKzmO+NKM7CuDgFr60D4TsvE
=ET4W
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nested-tests-1935.patch
Type: text/x-patch
Size: 133000 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090424/e492f8d9/attachment-0001.bin 


More information about the bazaar mailing list