mercurial/dispatch.py
changeset 19639 09573ad59f7b
parent 19229 41e39a0299cb
child 19640 472fa3b782b1
--- a/mercurial/dispatch.py	Tue Aug 13 01:38:30 2013 +0200
+++ b/mercurial/dispatch.py	Sat Jul 13 16:33:07 2013 -0500
@@ -88,6 +88,17 @@
 
     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 - "
@@ -619,10 +630,6 @@
     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:
@@ -699,10 +706,6 @@
     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]))