RFC: difference in dirstate iter_changes and inventory iter_changes
Aaron Bentley
aaron at aaronbentley.com
Tue Aug 12 02:36:29 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Yeah, it seems there was a new "Tree._comparison_data()" api added,
> which goes directly to disk to determine the kind, executable and stat
> value, rather than trusting the InventoryEntry directly. I missed that
> patch.
Tree._comparison data was introduced in revno 2162, before
workingtree_4.py even existed.
> Certainly it seems a bit... odd... to have so many paths to get
> different bits of information.
>
> We have "Tree._comparison_data", "Tree.path_content_summary()".
IIRC, path_content_summary was introduced for use in commit, and it does
provide more info.
> I'm not
> 100% sure why it is okay for the generic InterTree algorithm to use a
> private method on Tree.
_iter_changes was a private method, so it was perfectly fine for it to
call other private methods.
> Especially since the base Tree class has
> "NotImplementedError" which means that any Tree implementation doesn't
> just naturally get one.
> If it is part of the official tree api, doesn't it need to be public and
> tested?
iter_changes is what's part of the official API. Any Tree can opt out
of providing _comparison_data by providing its own implementation of
InterTree.iter_changes.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIoOkd0F+nu1YWqI0RAq+DAJ4szUpQ0IEA0eCcgimHMs89fFM51ACfQOUN
KjNiqGuptm77jCsIDgUC4S4=
=FoQC
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list