Comments
Patch
@@ -86,10 +86,21 @@
except ValueError:
pass # happens if called in a thread
try:
try:
+
+ # read --config before doing anything else
+ # (e.g. to change trust settings for reading .hg/hgrc)
+ cfgs = _parseconfig(req.ui, _earlygetopt(['--config'], req.args))
+
+ if req.repo:
+ # copy configs that were passed on the cmdline (--config) to
+ # the repo ui
+ for cfg in cfgs:
+ req.repo.ui.setconfig(*cfg)
+
# enter the debugger before command execution
if '--debugger' in req.args:
ui.warn(_("entering debugger - "
"type c to continue starting hg or h for help\n"))
pdb.set_trace()
@@ -617,14 +628,10 @@
_loaded = set()
def _dispatch(req):
args = req.args
ui = req.ui
- # read --config before doing anything else
- # (e.g. to change trust settings for reading .hg/hgrc)
- cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
-
# check for cwd
cwd = _earlygetopt(['--cwd'], args)
if cwd:
os.chdir(cwd[-1])
@@ -697,14 +704,10 @@
uis = set([ui, lui])
if req.repo:
uis.add(req.repo.ui)
- # copy configs that were passed on the cmdline (--config) to the repo ui
- for cfg in cfgs:
- req.repo.ui.setconfig(*cfg)
-
if options['verbose'] or options['debug'] or options['quiet']:
for opt in ('verbose', 'debug', 'quiet'):
val = str(bool(options[opt]))
for ui_ in uis:
ui_.setconfig('ui', opt, val)