[PATCH] color: add default colors for draft and secret changes

Kyle Lippincott spectral at pewpew.net
Tue May 26 16:04:51 CDT 2015


On Tue, May 26, 2015 at 1:37 PM, Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

>
>
> On 05/26/2015 01:07 PM, Matt Mackall wrote:
>
>> # HG changeset patch
>> # User Matt Mackall <mpm at selenic.com>
>> # Date 1432333213 18000
>> #      Fri May 22 17:20:13 2015 -0500
>> # Node ID 8e4a41b04eb9373da8c3639edfb060187465809c
>> # Parent  da0105aee52a058e03db3e9c9a187962efc0c7db
>> color: add default colors for draft and secret changes
>>
>> This highlights the changeset number in logs and summary. Together
>> with log -G, it gives a visual indication of which portions of your
>> repo are in which phase.
>>
>> I've chosen draft = magenta and secret = red. Public changesets
>> currently automatically use yellow today. There are basically no
>> "good" color choices available in this palette (I have to squint at
>> most of them), so I'm not going to belabor the selection process.
>>
>> diff -r da0105aee52a -r 8e4a41b04eb9 hgext/color.py
>> --- a/hgext/color.py    Fri May 22 17:08:59 2015 -0500
>> +++ b/hgext/color.py    Fri May 22 17:20:13 2015 -0500
>> @@ -78,8 +78,8 @@
>>
>>     # Blank so it inherits the style of the surrounding label
>>     changeset.public =
>> -  changeset.draft =
>> -  changeset.secret =
>> +  changeset.draft = magenta
>> +  changeset.secret = red
>>
>
> I think we should keep 'red' for stronger message.
>
> 1) I've been using 'red' for 'troubled' changeset at Facebook with
> significant success (and grey for obsolete one)
>
> 2) I've some experiment laying around to have all stderr output 'yellow'
> and actual error message (like abort) 'red'
>
> What about:
>
> public: yellow
>

Not everyone uses a black background (I don't understand why not, but..);
yellow is essentially unreadable on white background. The standard blue is
too dark on black backgrounds, the standard yellow is too light on white
backgrounds.  The 'safe' colors in the 16 normally representable that I've
encountered are:

bright black
red and bright red
green and bright green
dark yellow (aka brown)
magenta and bright magenta
cyan and bright cyan


> draft:  magenta
> secret: cyan or blue
>
> (blue is often miss rendered as to dark by mac)
>
>
>
>
> --
> Pierre-Yves David
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150526/4cdbce88/attachment.html>


More information about the Mercurial-devel mailing list