mercurial/dispatch.py
changeset 31127 7fec37746417
parent 31122 45be7590301d
child 31189 49ad6bf63107
--- a/mercurial/dispatch.py	Tue Feb 28 11:42:07 2017 +0100
+++ b/mercurial/dispatch.py	Sat Feb 25 19:44:23 2017 +0100
@@ -765,8 +765,11 @@
                 ui_.insecureconnections = True
 
         # setup color handling
+        coloropt = options['color']
         for ui_ in uis:
-            color.setup(ui_, options['color'])
+            if coloropt:
+                ui_.setconfig('ui', 'color', coloropt, '--color')
+            color.setup(ui_)
 
         if options['version']:
             return commands.version_(ui)