##// END OF EJS Templates
color: have the 'ui' object carry the '_colormode' directly...
Pierre-Yves David -
r31106:a185b903 default
parent child Browse files
Show More
@@ -168,7 +168,7 def setup(ui, coloropts):
168 argument. That function both set the colormode for the ui object and read
168 argument. That function both set the colormode for the ui object and read
169 the configuration looking for custom colors and effect definitions."""
169 the configuration looking for custom colors and effect definitions."""
170 mode = _modesetup(ui, coloropts)
170 mode = _modesetup(ui, coloropts)
171 ui.__class__._colormode = mode
171 ui._colormode = mode
172 if mode and mode != 'debug':
172 if mode and mode != 'debug':
173 configstyles(ui)
173 configstyles(ui)
174
174
@@ -128,8 +128,6 def _catchterm(*args):
128 raise error.SignalInterrupt
128 raise error.SignalInterrupt
129
129
130 class ui(object):
130 class ui(object):
131 # color mode: see mercurial/color.py for possible value
132 _colormode = None
133 def __init__(self, src=None):
131 def __init__(self, src=None):
134 """Create a fresh new ui object if no src given
132 """Create a fresh new ui object if no src given
135
133
@@ -157,6 +155,8 class ui(object):
157 self.insecureconnections = False
155 self.insecureconnections = False
158 # Blocked time
156 # Blocked time
159 self.logblockedtimes = False
157 self.logblockedtimes = False
158 # color mode: see mercurial/color.py for possible value
159 self._colormode = None
160
160
161 if src:
161 if src:
162 self.fout = src.fout
162 self.fout = src.fout
@@ -173,6 +173,8 class ui(object):
173 self.environ = src.environ
173 self.environ = src.environ
174 self.callhooks = src.callhooks
174 self.callhooks = src.callhooks
175 self.insecureconnections = src.insecureconnections
175 self.insecureconnections = src.insecureconnections
176 self._colormode = src._colormode
177
176 self.fixconfig()
178 self.fixconfig()
177
179
178 self.httppasswordmgrdb = src.httppasswordmgrdb
180 self.httppasswordmgrdb = src.httppasswordmgrdb
General Comments 0
You need to be logged in to leave comments. Login now