[MERGE] 'bzr annotate' shows dotted revnos and --show-ids
Wouter van Heyst
larstiq at larstiq.dyndns.org
Thu Dec 14 02:44:24 GMT 2006
On Wed, Dec 13, 2006 at 05:27:22PM -0600, John Arbash Meinel wrote:
> The attached patch updates 'bzr annotate' in 2 ways. First, it shows
> dotted revnos by default, instead of showing 'merge'. Second, it allows
> you to specify --show-ids and it will display revision ids instead of
> revnos.
Thanks, this make annotate quite useful again with bzr.dev :)
> It ends up changing the alignment slightly, because while using it, this
> seemed to be the best alignment for the different options. I'm also
> attaching some of the new annotation output so people can get a feel for
> it. If you want something interesting, try doing annotate on NEWS...
>
> Attached is an annotation of the first 30 lines NEWS from bzr
> originally, and then with the new dotted form, and then with --show-ids.
> It should be pretty obvious which is which if you look at the texts.
>
> Comments? It should be possible to add something like --merge-points,
> which would show the point where the change was merged into the current
> mainline, but I'll have to think about that for a bit.
I'm happy enough as is with that. Something else I do wish for from time
to time is an easy way to determine in what release a bugfix showed up
first.
> def _annotate_file(branch, rev_id, file_id ):
>
> rh = branch.revision_history()
> - w = branch.repository.weave_store.get_weave(file_id,
> + revision_graph = branch.repository.get_revision_graph(rev_id)
> + merge_sorted_revisions = tsort.merge_sort(
> + revision_graph,
> + rev_id,
> + None,
> + generate_revno=True)
> + revision_id_to_revno = dict((rev_id, revno)
> + for seq_num, rev_id, depth, revno, end_of_merge
> + in merge_sorted_revisions)
> + w = branch.repository.weave_store.get_weave(file_id,
Seeing mention of weaves in generic code always makes me think of
jrydberg. Shouldn't that be text_store instead of weave_store? Though with
get_weave being called..
The remaining thing throwing me slightly off is the mismatch between
cmd_annotate and annotate_file parameters.
cmd_annotate: all, long
annotate_file: verbose, full
Particularly my mind associating all with full didn't help.
Unfortunately both have been available like that in the wild for quite a
while :/
So, +1, I'd really like to see this go in.
Wouter van Heyst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061214/a3b3c037/attachment.pgp
More information about the bazaar
mailing list