changeset 14754:189a7562d72e stable

dispatch: set config options on the request repo.ui
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:59 +0300
parents 10dcb3e7cb55
children 6ba51c81ff75
files mercurial/dispatch.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Jun 24 19:44:59 2011 +0300
+++ b/mercurial/dispatch.py	Fri Jun 24 19:44:59 2011 +0300
@@ -530,7 +530,7 @@
 
     # read --config before doing anything else
     # (e.g. to change trust settings for reading .hg/hgrc)
-    _parseconfig(ui, _earlygetopt(['--config'], args))
+    cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
 
     # check for cwd
     cwd = _earlygetopt(['--cwd'], args)
@@ -602,6 +602,10 @@
     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)
+
     for opt in ('verbose', 'debug', 'quiet', 'traceback'):
         val = bool(options[opt])
         if val: