equal
deleted
inserted
replaced
126 |
126 |
127 def _catchterm(*args): |
127 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 |
136 Use uimod.ui.load() to create a ui which knows global and user configs. |
134 Use uimod.ui.load() to create a ui which knows global and user configs. |
137 In most cases, you should use ui.copy() to create a copy of an existing |
135 In most cases, you should use ui.copy() to create a copy of an existing |
155 self.callhooks = True |
153 self.callhooks = True |
156 # Insecure server connections requested. |
154 # Insecure server connections requested. |
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 |
163 self.ferr = src.ferr |
163 self.ferr = src.ferr |
164 self.fin = src.fin |
164 self.fin = src.fin |
171 self._trustusers = src._trustusers.copy() |
171 self._trustusers = src._trustusers.copy() |
172 self._trustgroups = src._trustgroups.copy() |
172 self._trustgroups = src._trustgroups.copy() |
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 |
179 self._blockedtimes = src._blockedtimes |
181 self._blockedtimes = src._blockedtimes |
180 else: |
182 else: |