[MERGE] 'bzr annotate' shows dotted revnos and --show-ids

John Arbash Meinel john at arbash-meinel.com
Thu Dec 14 20:58:53 GMT 2006


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

Well we already have 'annotate_file' which is the public function.
We certainly could refactor it in some useful way. I'm not sure what
would be the most useful for something like gannotate. So what if you do
the refactoring, along with fixing gannotate to use it?

Maybe we could call the function annotate_to_lines, or something like that.

Though I think gannotate's working method would be quite different.
Because it is longer lived, and wants to display the information in the
bottom half, it should extract the mapping first, and pass it into the
helper function.

There are enough differences between what gannotate wants, and what
annotate_file is currently doing, that I'm not positive if it is worth
it. It really isn't a whole lot of code.

John
=:->





More information about the bazaar mailing list