Patchwork [6,of,6] color: set initial default value for 'colormode' to None

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 21, 2017, 10:18 p.m.
Message ID <87e88ffa32cd60d1f380.1487715482@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/18702/
State Accepted
Headers show

Comments

Pierre-Yves David - Feb. 21, 2017, 10:18 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1482383925 -3600
#      Thu Dec 22 06:18:45 2016 +0100
# Node ID 87e88ffa32cd60d1f380ebe5259562a162fa94a8
# Parent  2278337558dfe55dc11db33654bff351c9a8ee2e
# EXP-Topic color
color: set initial default value for 'colormode' to None

This should not introduce any behavior changes when using the color extension.
In practive, the colormode will be setup at early at run time to the proper
value (from config and environment).

We do this change as this gets us closer of a state were we can have all the
mechanisms associated to color in core with the feature disabled by default.

Patch

diff -r 2278337558df -r 87e88ffa32cd hgext/color.py
--- a/hgext/color.py	Thu Dec 22 13:19:12 2016 +0100
+++ b/hgext/color.py	Thu Dec 22 06:18:45 2016 +0100
@@ -297,7 +297,7 @@  def _modesetup(ui, coloropt):
     return None
 
 class colorui(uimod.ui):
-    _colormode = 'ansi'
+    _colormode = None
     def write(self, *args, **opts):
         if self._colormode is None:
             return super(colorui, self).write(*args, **opts)