Patchwork [4,of,9] configitems: register the 'ui.color' config

login
register
mail settings
Submitter Boris Feld
Date July 15, 2017, 6:41 p.m.
Message ID <789783a6db854e810b33.1500144067@FB>
Download mbox | patch
Permalink /patch/22408/
State Accepted
Headers show

Comments

Boris Feld - July 15, 2017, 6:41 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1500120893 -7200
#      Sat Jul 15 14:14:53 2017 +0200
# Node ID 789783a6db854e810b3381d2e0b9e4252238851c
# Parent  151a6237b3445206b8547da91545bdc21a023bb9
# EXP-Topic config.register.special-case
configitems: register the 'ui.color' config

Patch

diff -r 151a6237b344 -r 789783a6db85 mercurial/color.py
--- a/mercurial/color.py	Sat Jul 15 14:14:46 2017 +0200
+++ b/mercurial/color.py	Sat Jul 15 14:14:53 2017 +0200
@@ -183,7 +183,7 @@ 
 def _modesetup(ui):
     if ui.plain():
         return None
-    config = ui.config('ui', 'color', 'auto')
+    config = ui.config('ui', 'color')
     if config == 'debug':
         return 'debug'
 
diff -r 151a6237b344 -r 789783a6db85 mercurial/configitems.py
--- a/mercurial/configitems.py	Sat Jul 15 14:14:46 2017 +0200
+++ b/mercurial/configitems.py	Sat Jul 15 14:14:53 2017 +0200
@@ -430,6 +430,9 @@ 
 coreconfigitem('ui', 'clonebundles',
     default=True,
 )
+coreconfigitem('ui', 'color',
+    default='auto',
+)
 coreconfigitem('ui', 'commitsubrepos',
     default=False,
 )