# HG changeset patch # User Pierre-Yves David # Date 1498786329 -7200 # Node ID 95c57596b3807421eb10316cb6247735cc6ed746 # Parent a0068f49b5f639d60f46589415c82ae7defc4891 configitems: register the 'color.mode' config diff -r a0068f49b5f6 -r 95c57596b380 mercurial/color.py --- a/mercurial/color.py Sat Jul 01 21:57:17 2017 +0200 +++ b/mercurial/color.py Fri Jun 30 03:32:09 2017 +0200 @@ -208,7 +208,7 @@ formatted = (always or (encoding.environ.get('TERM') != 'dumb' and ui.formatted())) - mode = ui.config('color', 'mode', 'auto') + mode = ui.config('color', 'mode') # If pager is active, color.pagermode overrides color.mode. if getattr(ui, 'pageractive', False): diff -r a0068f49b5f6 -r 95c57596b380 mercurial/configitems.py --- a/mercurial/configitems.py Sat Jul 01 21:57:17 2017 +0200 +++ b/mercurial/configitems.py Fri Jun 30 03:32:09 2017 +0200 @@ -56,6 +56,9 @@ coreconfigitem = getitemregister(coreitems) +coreconfigitem('color', 'mode', + default='auto', +) coreconfigitem('devel', 'all-warnings', default=False, )