--- a/mercurial/cmdutil.py Mon Jun 25 22:08:10 2007 +0200
+++ b/mercurial/cmdutil.py Mon Jun 25 22:41:15 2007 +0200
@@ -275,7 +275,13 @@
# remember how to call 'hg' before changing the working dir
util.set_hgexecutable(argv0)
- # check for cwd first
+ # read --config before doing anything else
+ # (e.g. to change trust settings for reading .hg/hgrc)
+ config = earlygetopt(['--config'], args)
+ if config:
+ ui.updateopts(config=parseconfig(config))
+
+ # check for cwd
cwd = earlygetopt(['--cwd'], args)
if cwd:
os.chdir(cwd[-1])
@@ -325,8 +331,7 @@
atexit.register(print_time)
ui.updateopts(options["verbose"], options["debug"], options["quiet"],
- not options["noninteractive"], options["traceback"],
- parseconfig(options["config"]))
+ not options["noninteractive"], options["traceback"])
if options['help']:
return commands.help_(ui, cmd, options['version'])