[MERGE] annotate uncommitted changes
Aaron Bentley
aaron.bentley at utoronto.ca
Sun Dec 17 17:54:12 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Aaron Bentley wrote:
> v- We need a couple more blank lines here.
>
> +
> +from bzrlib import annotate, tests
> +
> +def annotation(text):
> + return [tuple(l.split(' ', 1)) for l in text.splitlines(True)]
> +
Done.
> v- Why do you need a separate public and private 'reannotate' function,
> rather than just having Tree.annotate_iter()?
Each of the three callables has pretty unique functionality:
WorkingTree.annotate_iter gets the basis annotation and determines
whether to just return it or to reannotate.
reannotate gets an annotation against the basis, and if there's more
than one parent, gets more annotations and merges them.
_reannotate annotates against a single parent.
Splitting them out as three callables enhances readability and
testability. Hanging reannotate off WorkingTree doesn't make sense
because the operation of reannotation has nothing to do with
WorkingTrees. In fact, it's possible to use the reannotate code to
generate annotations from scratch. Which might or might not be
desirable for an SVNRevisionTree. (SVN does provide annotations, it's
just that from a bzr perspective, these annotations are wrong because
they only annotate against basis.)
> So, conditional +1, I'll update BB.
Thanks for the review. I've updated and submitted.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFhYRE0F+nu1YWqI0RAiWDAKCGq3MFgfaIVK2275Hs5NR6Y2yQTACfRQ2L
xkZAdVKtSQBom8FtuCcdd20=
=lfk8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list