comparison mercurial/ui.py @ 31083:c42feb5f3143

color: move '_colormode' to the core 'ui' class Having all 'ui' objects aware of 'color' allows us to update the core code to handle color. The mode will stay 'None' in the default case so that will not introduce any changes.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 20 Feb 2017 12:12:08 +0100
parents 873ebdd6e84d
children 894bdcdc75df
comparison
equal deleted inserted replaced
31082:abb92b3d370e 31083:c42feb5f3143
125 125
126 def _catchterm(*args): 126 def _catchterm(*args):
127 raise error.SignalInterrupt 127 raise error.SignalInterrupt
128 128
129 class ui(object): 129 class ui(object):
130 # color mode: see mercurial/color.py for possible value
131 _colormode = None
130 def __init__(self, src=None): 132 def __init__(self, src=None):
131 """Create a fresh new ui object if no src given 133 """Create a fresh new ui object if no src given
132 134
133 Use uimod.ui.load() to create a ui which knows global and user configs. 135 Use uimod.ui.load() to create a ui which knows global and user configs.
134 In most cases, you should use ui.copy() to create a copy of an existing 136 In most cases, you should use ui.copy() to create a copy of an existing