Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 20788:f144928dd058
config: give a useful hint of source for the most common command line settings
'hg showconfig --debug' will instead of:
none: ui.verbose=False
give the better hint:
--verbose: ui.verbose=False
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 19 Mar 2014 02:45:04 +0100 |
parents | be179da10d5f |
children | 350dc24a553d |
comparison
equal
deleted
inserted
replaced
20787:be179da10d5f | 20788:f144928dd058 |
---|---|
155 def restoreconfig(self, data): | 155 def restoreconfig(self, data): |
156 self._ocfg.restore(data[0]) | 156 self._ocfg.restore(data[0]) |
157 self._tcfg.restore(data[1]) | 157 self._tcfg.restore(data[1]) |
158 self._ucfg.restore(data[2]) | 158 self._ucfg.restore(data[2]) |
159 | 159 |
160 def setconfig(self, section, name, value): | 160 def setconfig(self, section, name, value, source=''): |
161 for cfg in (self._ocfg, self._tcfg, self._ucfg): | 161 for cfg in (self._ocfg, self._tcfg, self._ucfg): |
162 cfg.set(section, name, value) | 162 cfg.set(section, name, value, source) |
163 self.fixconfig(section=section) | 163 self.fixconfig(section=section) |
164 | 164 |
165 def _data(self, untrusted): | 165 def _data(self, untrusted): |
166 return untrusted and self._ucfg or self._tcfg | 166 return untrusted and self._ucfg or self._tcfg |
167 | 167 |