[PATCH] add color diff support to record extension
Brodie Rao
dackze at gmail.com
Thu Aug 13 19:29:26 CDT 2009
On Aug 13, 2009, at 7:44 PM, Giorgos Keramidas wrote:
> On Thu, 13 Aug 2009 13:03:44 -0400, Brodie Rao <dackze at gmail.com>
> wrote:
>> I think moving color into ui is the most obvious choice. I think
>> Dan's
>> idea of augmenting ui.write() to emit colors is good.
>>
>> I haven't had a chance to look into it deeply, but I imagine you'd
>> need to do the following things:
>>
>> 1. Take color's smart terminal detection and make sure ui can do the
>> same.
>>
>> 2. Make --color and --no-color global options. (I'd really like to
>> get
>> rid of --no-color, though.)
>
> As long as there *is* an option to turn coloring off, --no-color can
> go.
--color=never does that. --no-color predates the --color option, and
it was kept around for compatibility reasons. It'd be nice if it were
marked deprecated and didn't appear in help text by default.
> One of the buglets I have discovered about the color extension is
> that it messes up TAB/SPC combinations in the colorized diff output,
> so
> I often turn it off to see the "actual patch text".
Could you elaborate on this? I don't deal with diffs that have mixed
tabs and spaces often, but I'm not able to duplicate the issue myself:
diff --git a/foo b/foo
--- a/foo
+++ b/foo
@@ -1,2 +1,4 @@
<tab><spc><spc>foo
<spc><spc><tab>bar
+<tab><spc><spc>foo
+<spc><spc><tab>bar
In Terminal.app, that diff displays the same with and without color.
More information about the Mercurial-devel
mailing list