# HG changeset patch # User Idan Kamara # Date 2011-06-24 16:44:59 # Node ID 189a7562d72ee1d3ce42daa8641a574da68cf906 # Parent 10dcb3e7cb555bceceb066465dda0a9daa330773 dispatch: set config options on the request repo.ui diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -530,7 +530,7 @@ def _dispatch(req): # 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 @@ def _dispatch(req): 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: