adding log command to color extension

Brodie Rao dackze at gmail.com
Sat Mar 20 13:27:52 CDT 2010


On Mar 20, 2010, at 8:24 AM, Gilles Moris wrote:

> On Friday 19 March 2010 11:22:59 pm Brodie Rao wrote:
>> I agree with Martin, and I think yellow'd be nice. I've done something
>> similar in a patch series I'm working on for direct color/annotation
>> support (as opposed to parsing/wrapping output). Highlighting each
>> changeset line makes scanning a lot easier, especially when displaying
>> diffs with hg log -p.
> 
> I came up wrapping changeset_printer._show instead of changeset_printer.showpatch.
> However, I'd like the 'hg log -v' highlight the commit message, which is not
> currently possible because there is no prefix to be parsed.
> I think your direct color support will help here.
> Is this the core tagged write that have been discussed at some point of time ?
> When will this be ready ?

http://bitbucket.org/brodie/mercurial-crew-mq/src/

See the ui-label patches. It's an implementation of annotated writes, so yes. Most of the work is done, there are just a couple things that are very messy right now (how diff and record annotation is implemented, mainly). I think it'll be ready before 1.6.

> In the mean time, do you think it's worth looking that way (I also colorized
> tags and branches, could be useful; tested on dark and light background):

I think wrapping changeset_printer is probably a more robust way of doing it (also colorizes incoming, outgoing, etc). If you want to match against strings in an i18n-friendly way, you'd have to use the exact same strings changeset_printer uses with _(), which could get a little messy with keeping the duplicated strings in sync.


More information about the Mercurial-devel mailing list