diff --git a/mercurial/color.py b/mercurial/color.py --- a/mercurial/color.py +++ b/mercurial/color.py @@ -208,7 +208,7 @@ def _modesetup(ui): 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 --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -56,6 +56,9 @@ def getitemregister(configtable): coreconfigitem = getitemregister(coreitems) +coreconfigitem('color', 'mode', + default='auto', +) coreconfigitem('devel', 'all-warnings', default=False, )