# HG changeset patch # User Pierre-Yves David # Date 1492302771 -7200 # Node ID 57042e91521ab4fdd3dc403ac05e7c9d5c48792b # Parent d323d9e0d7b41c157edaefa3b49d5f8f4afc9590 color: turn on by default (but for windows) Color support is all in core for a couple of months. I've browsed the bug tracker without finding any blocker bug. So I'm moving forward and enable color on by default before '4.2-rc'. In the worse case, having it on in the release candidate will help us to find blocker bug and we can turn it off for the final release. I remember people talking about issue with Windows during the freeze so I'm keeping it off by default on that OS. We could do various cleaning of the color used and the label issued. However the label are probably already in our backward compatibility envelope since the color extensions has been around since for ever and I do not think the color choice themself should be considered BC. So I think we should rather gives color to all user sooner than later. A couple of test needs to be updated to avoid having color related control code spoil the tested output. diff -r d323d9e0d7b4 -r 57042e91521a mercurial/color.py --- a/mercurial/color.py Sun Apr 16 02:48:06 2017 +0200 +++ b/mercurial/color.py Sun Apr 16 02:32:51 2017 +0200 @@ -45,8 +45,7 @@ curses = None _baseterminfoparams = {} -# allow the extensions to change the default -_enabledbydefault = False +_enabledbydefault = pycompat.osname != 'nt' # start and stop parameters for effects _effects = { diff -r d323d9e0d7b4 -r 57042e91521a tests/test-mq.t --- a/tests/test-mq.t Sun Apr 16 02:48:06 2017 +0200 +++ b/tests/test-mq.t Sun Apr 16 02:32:51 2017 +0200 @@ -365,10 +365,10 @@ setting columns & formatted tests truncating (issue1912) - $ COLUMNS=4 hg qseries --config ui.formatted=true + $ COLUMNS=4 hg qseries --config ui.formatted=true --color=no test.patch test2.patch - $ COLUMNS=20 hg qseries --config ui.formatted=true -vs + $ COLUMNS=20 hg qseries --config ui.formatted=true -vs --color=no 0 A test.patch: f... 1 A test2.patch: $ hg qpop diff -r d323d9e0d7b4 -r 57042e91521a tests/test-pager-legacy.t --- a/tests/test-pager-legacy.t Sun Apr 16 02:48:06 2017 +0200 +++ b/tests/test-pager-legacy.t Sun Apr 16 02:32:51 2017 +0200 @@ -10,6 +10,7 @@ $ cat >> $HGRCPATH < [ui] > formatted = yes + > color = no > [extensions] > pager= > [pager] diff -r d323d9e0d7b4 -r 57042e91521a tests/test-pager.t --- a/tests/test-pager.t Sun Apr 16 02:48:06 2017 +0200 +++ b/tests/test-pager.t Sun Apr 16 02:32:51 2017 +0200 @@ -10,6 +10,7 @@ $ cat >> $HGRCPATH < [ui] > formatted = yes + > color = no > [pager] > pager = python $TESTTMP/fakepager.py > EOF