[MERGE] 'bzr annotate' shows dotted revnos and --show-ids
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Dec 15 14:17:54 GMT 2006
>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:
jam> Vincent Ladeuil wrote:
>>>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:
>>
jam> The attached patch updates 'bzr annotate' in 2
jam> ways. First, it shows dotted revnos by default, instead
jam> of showing 'merge'. Second, it allows you to specify
jam> --show-ids and it will display revision ids instead of
jam> revnos.
>>
>> Wow. Very nice.
>>
>> What about making _annotate_file a public function ?
>> gannotate is currently doing mostly the same job but need to
>> duplicate the code which is not nice.
>>
>> It also maintain a cache between revids and revno but in a
>> slightly different way, so may be given access to your
>> revision_id_to_revno mapping can be reused too.
>>
>> Vincent
jam> Well we already have 'annotate_file' which is the public
jam> function. We certainly could refactor it in some useful
jam> way. I'm not sure what would be the most useful for
jam> something like gannotate. So what if you do the
jam> refactoring, along with fixing gannotate to use it?
No problem. I didn't because Aaron was the author of both the
versions and I didn't want to step on his toes. If it's not a
problem for him, I'll give it a try (Aaron, do not hesitate to
let your toes yell or give useful suggestions ;).
jam> Maybe we could call the function annotate_to_lines, or
jam> something like that.
jam> Though I think gannotate's working method would be quite
jam> different. Because it is longer lived, and wants to
jam> display the information in the bottom half, it should
jam> extract the mapping first, and pass it into the helper
jam> function.
jam> There are enough differences between what gannotate
jam> wants, and what annotate_file is currently doing, that
jam> I'm not positive if it is worth it. It really isn't a
jam> whole lot of code.
Yeah, but the dotted revno stuff was indeed coded two times, so
may be we can avoid another future double-handling...
Vincent
More information about the bazaar
mailing list