[PATCH] add color diff support to record extension

Matt Mackall mpm at selenic.com
Fri Aug 14 12:16:45 CDT 2009

On Mon, 2009-08-10 at 11:49 +0200, Dirkjan Ochtman wrote:
> On Mon, Aug 10, 2009 at 11:45, Dan Villiom Podlaski
> Christiansen<danchr at gmail.com> wrote:
> > Wouldn't it be worthwhile to integrate colour support into core? Currently,
> > the extension either duplicates the functionality of the commands it wraps,
> > or parses their output. It seems likely that having the commands themselves
> > add styles would make the implementation both simpler and more accurate.
> Would be fine with me as I already enable it everywhere anyway. I'll
> let Matt decide, though.

No thanks. Mercurial is, at its core, a plain text application.

However, I will consider extending the ui class in a way that allows
code to 'hint' to extensions or GUIs that some text ought to be
displayed differently. But you should think something like CSS
stylesheets: mark things as "status:add" rather than "yellow". So
something like:

ui.write("A %s\n" % filename, style="status:add")

http://selenic.com : development and support for Mercurial and Linux

More information about the Mercurial-devel mailing list