[MERGE] Updates to Tree.iter_references

John Arbash Meinel john at arbash-meinel.com
Fri Jun 20 20:08:07 BST 2008


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

This patch has several updates to how iter_references works.

1) It should be returning the relpath rather than the abspath. There is
no way to get an abspath for RevisionTree, so it doesn't make sense to
require absolute path.

2) WT._kind(relpath) takes a relpath anyway, we were erroneously passing
in an absolute path to the function.

3) We had stopped testing RevisionTree.iter_references because it was
being backed by a WorkingTree3, which didn't support references. (It did
at the time the tests were written.)

This brings back proper testing for it, and adds tests for
DirStateRevisionTree as well.

4) This adds no-op checks to WT4 and DirStateRevisionTree when we know
that there will be no references.

I expect this will speed up some functionality, which was causing us to
stat the whole filesystem to check if there were any new tree
references. It also means the function has a stable api, since it is
properly being tested again.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhcABcACgkQJdeBCYSNAAPH9ACff+TkFmWGsNRe4a3bO42BmIHn
/CgAnjDgYuSb0k95eM/fowPTdWwFTQoT
=y3FH
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: iter_references.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080620/7c3fac41/attachment-0001.diff 


More information about the bazaar mailing list