changeset 3348:e4aa22eaa0e4

call ui.updateopts only after changing directories This corrects --config paths.foo=bar when it's used with --cwd
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 10 Oct 2006 18:43:20 -0300
parents bce7c1b4c1c8
children 25d270e0b27f
files mercurial/commands.py tests/test-globalopts.out
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Oct 10 18:43:20 2006 -0300
+++ b/mercurial/commands.py	Tue Oct 10 18:43:20 2006 -0300
@@ -3318,10 +3318,6 @@
                     (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
             atexit.register(print_time)
 
-        u.updateopts(options["verbose"], options["debug"], options["quiet"],
-                     not options["noninteractive"], options["traceback"],
-                     parseconfig(options["config"]))
-
         # enter the debugger before command execution
         if options['debugger']:
             pdb.set_trace()
@@ -3334,6 +3330,10 @@
                     raise util.Abort('%s: %s' %
                                      (options['cwd'], inst.strerror))
 
+            u.updateopts(options["verbose"], options["debug"], options["quiet"],
+                         not options["noninteractive"], options["traceback"],
+                         parseconfig(options["config"]))
+
             path = u.expandpath(options["repository"]) or ""
             repo = path and hg.repository(u, path=path) or None
             if repo and not repo.local():
--- a/tests/test-globalopts.out	Tue Oct 10 18:43:20 2006 -0300
+++ b/tests/test-globalopts.out	Tue Oct 10 18:43:20 2006 -0300
@@ -105,6 +105,7 @@
 
 
 %% --traceback
+Traceback (most recent call last):
 %% --time
 Time: real x.x secs (user x.x+x.x sys x.x+x.x)
 %% --version