Show More
@@ -40,7 +40,7 b' def dispatch(req):' | |||
|
40 | 40 | if not req.ui: |
|
41 | 41 | req.ui = uimod.ui() |
|
42 | 42 | if '--traceback' in req.args: |
|
43 | req.ui.setconfig('ui', 'traceback', 'on') | |
|
43 | req.ui.setconfig('ui', 'traceback', 'on', '--traceback') | |
|
44 | 44 | |
|
45 | 45 | # set ui streams from the request |
|
46 | 46 | if req.fin: |
@@ -104,7 +104,7 b' def _runcatch(req):' | |||
|
104 | 104 | # copy configs that were passed on the cmdline (--config) to |
|
105 | 105 | # the repo ui |
|
106 | 106 | for cfg in cfgs: |
|
107 | req.repo.ui.setconfig(*cfg) | |
|
107 | req.repo.ui.setconfig(*cfg, source='--config') | |
|
108 | 108 | |
|
109 | 109 | # if we are in HGPLAIN mode, then disable custom debugging |
|
110 | 110 | debugger = ui.config("ui", "debugger") |
@@ -518,7 +518,7 b' def _parseconfig(ui, config):' | |||
|
518 | 518 | section, name = name.split('.', 1) |
|
519 | 519 | if not section or not name: |
|
520 | 520 | raise IndexError |
|
521 | ui.setconfig(section, name, value) | |
|
521 | ui.setconfig(section, name, value, '--config') | |
|
522 | 522 | configs.append((section, name, value)) |
|
523 | 523 | except (IndexError, ValueError): |
|
524 | 524 | raise util.Abort(_('malformed --config option: %r ' |
@@ -735,19 +735,19 b' def _dispatch(req):' | |||
|
735 | 735 | for opt in ('verbose', 'debug', 'quiet'): |
|
736 | 736 | val = str(bool(options[opt])) |
|
737 | 737 | for ui_ in uis: |
|
738 | ui_.setconfig('ui', opt, val) | |
|
738 | ui_.setconfig('ui', opt, val, '--' + opt) | |
|
739 | 739 | |
|
740 | 740 | if options['traceback']: |
|
741 | 741 | for ui_ in uis: |
|
742 | ui_.setconfig('ui', 'traceback', 'on') | |
|
742 | ui_.setconfig('ui', 'traceback', 'on', '--traceback') | |
|
743 | 743 | |
|
744 | 744 | if options['noninteractive']: |
|
745 | 745 | for ui_ in uis: |
|
746 | ui_.setconfig('ui', 'interactive', 'off') | |
|
746 | ui_.setconfig('ui', 'interactive', 'off', '-y') | |
|
747 | 747 | |
|
748 | 748 | if cmdoptions.get('insecure', False): |
|
749 | 749 | for ui_ in uis: |
|
750 | ui_.setconfig('web', 'cacerts', '') | |
|
750 | ui_.setconfig('web', 'cacerts', '', '--insecure') | |
|
751 | 751 | |
|
752 | 752 | if options['version']: |
|
753 | 753 | return commands.version_(ui) |
@@ -773,7 +773,7 b' def _dispatch(req):' | |||
|
773 | 773 | repo = hg.repository(ui, path=path) |
|
774 | 774 | if not repo.local(): |
|
775 | 775 | raise util.Abort(_("repository '%s' is not local") % path) |
|
776 | repo.ui.setconfig("bundle", "mainreporoot", repo.root) | |
|
776 | repo.ui.setconfig("bundle", "mainreporoot", repo.root, 'repo') | |
|
777 | 777 | except error.RequirementError: |
|
778 | 778 | raise |
|
779 | 779 | except error.RepoError: |
@@ -157,9 +157,9 b' class ui(object):' | |||
|
157 | 157 | self._tcfg.restore(data[1]) |
|
158 | 158 | self._ucfg.restore(data[2]) |
|
159 | 159 | |
|
160 | def setconfig(self, section, name, value): | |
|
160 | def setconfig(self, section, name, value, source=''): | |
|
161 | 161 | for cfg in (self._ocfg, self._tcfg, self._ucfg): |
|
162 | cfg.set(section, name, value) | |
|
162 | cfg.set(section, name, value, source) | |
|
163 | 163 | self.fixconfig(section=section) |
|
164 | 164 | |
|
165 | 165 | def _data(self, untrusted): |
@@ -141,7 +141,7 b' customized hgrc' | |||
|
141 | 141 | $ hg showconfig |
|
142 | 142 | read config from: $TESTTMP/hgrc |
|
143 | 143 | $TESTTMP/hgrc:13: alias.log=log -g |
|
144 |
|
|
|
144 | repo: bundle.mainreporoot=$TESTTMP | |
|
145 | 145 | $TESTTMP/hgrc:11: defaults.identify=-n |
|
146 | 146 | $TESTTMP/hgrc:2: ui.debug=true |
|
147 | 147 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII |
@@ -157,11 +157,11 b' plain hgrc' | |||
|
157 | 157 | $ HGPLAIN=; export HGPLAIN |
|
158 | 158 | $ hg showconfig --config ui.traceback=True --debug |
|
159 | 159 | read config from: $TESTTMP/hgrc |
|
160 |
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
160 | repo: bundle.mainreporoot=$TESTTMP | |
|
161 | --config: ui.traceback=True | |
|
162 | --verbose: ui.verbose=False | |
|
163 | --debug: ui.debug=True | |
|
164 | --quiet: ui.quiet=False | |
|
165 | 165 | |
|
166 | 166 | plain mode with exceptions |
|
167 | 167 | |
@@ -175,29 +175,29 b' plain mode with exceptions' | |||
|
175 | 175 | $ hg showconfig --config ui.traceback=True --debug |
|
176 | 176 | plain: True |
|
177 | 177 | read config from: $TESTTMP/hgrc |
|
178 |
|
|
|
178 | repo: bundle.mainreporoot=$TESTTMP | |
|
179 | 179 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
180 |
|
|
|
181 |
|
|
|
182 |
|
|
|
183 |
|
|
|
180 | --config: ui.traceback=True | |
|
181 | --verbose: ui.verbose=False | |
|
182 | --debug: ui.debug=True | |
|
183 | --quiet: ui.quiet=False | |
|
184 | 184 | $ unset HGPLAIN |
|
185 | 185 | $ hg showconfig --config ui.traceback=True --debug |
|
186 | 186 | plain: True |
|
187 | 187 | read config from: $TESTTMP/hgrc |
|
188 |
|
|
|
188 | repo: bundle.mainreporoot=$TESTTMP | |
|
189 | 189 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
190 |
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
|
190 | --config: ui.traceback=True | |
|
191 | --verbose: ui.verbose=False | |
|
192 | --debug: ui.debug=True | |
|
193 | --quiet: ui.quiet=False | |
|
194 | 194 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT |
|
195 | 195 | $ hg showconfig --config ui.traceback=True --debug |
|
196 | 196 | plain: True |
|
197 | 197 | read config from: $TESTTMP/hgrc |
|
198 |
|
|
|
198 | repo: bundle.mainreporoot=$TESTTMP | |
|
199 | 199 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
|
200 | --config: ui.traceback=True | |
|
201 | --verbose: ui.verbose=False | |
|
202 | --debug: ui.debug=True | |
|
203 | --quiet: ui.quiet=False |
General Comments 0
You need to be logged in to leave comments.
Login now