Whats the difference between annotate and tree.annotate_iter ?

Robert Collins robertc at robertcollins.net
Fri Apr 27 04:59:39 BST 2007


I'm not clear what annotate.py is attempting to do. Is it a UI layer on
top of trees? (in which case its poking way to deep under the hood) Or
is it the preferred interface for obtaining annotations (in which case
it should be a method on the thing storing the data - e.g. RevisionTree
and WorkingTree.

Now there is Tree.annotate_iter, which appears to also back onto the
weave store for RevisionTree, which is more tolerable.

I *think* that annotate.py is really 'text ui output for annotation' and
as such should take an annotate_iterator rather than calling into the
repository itself.

Really though I think the API needed for the text ui should be more
properly on Tree, so that we can find bugs in annotations with different
tree representations via our parameterised tests.

This came up when I looked at using BranchBuilder on test_annotate, and
promptly got very confused about the intention of it. So for now I'm
skipping that test while this discussion is had - though it is a good
candidate in the future [probably after moving it to a per-tree test.]

-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/20070427/f15c7e92/attachment.pgp 


More information about the bazaar mailing list