##// END OF EJS Templates
dispatch: move command line --config argument parsing to _runcatch()...
Sean Farley -
r19639:09573ad5 default
parent child Browse files
Show More
@@ -88,6 +88,17 b' def _runcatch(req):'
88
88
89 try:
89 try:
90 try:
90 try:
91
92 # read --config before doing anything else
93 # (e.g. to change trust settings for reading .hg/hgrc)
94 cfgs = _parseconfig(req.ui, _earlygetopt(['--config'], req.args))
95
96 if req.repo:
97 # copy configs that were passed on the cmdline (--config) to
98 # the repo ui
99 for cfg in cfgs:
100 req.repo.ui.setconfig(*cfg)
101
91 # enter the debugger before command execution
102 # enter the debugger before command execution
92 if '--debugger' in req.args:
103 if '--debugger' in req.args:
93 ui.warn(_("entering debugger - "
104 ui.warn(_("entering debugger - "
@@ -619,10 +630,6 b' def _dispatch(req):'
619 args = req.args
630 args = req.args
620 ui = req.ui
631 ui = req.ui
621
632
622 # read --config before doing anything else
623 # (e.g. to change trust settings for reading .hg/hgrc)
624 cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
625
626 # check for cwd
633 # check for cwd
627 cwd = _earlygetopt(['--cwd'], args)
634 cwd = _earlygetopt(['--cwd'], args)
628 if cwd:
635 if cwd:
@@ -699,10 +706,6 b' def _dispatch(req):'
699 if req.repo:
706 if req.repo:
700 uis.add(req.repo.ui)
707 uis.add(req.repo.ui)
701
708
702 # copy configs that were passed on the cmdline (--config) to the repo ui
703 for cfg in cfgs:
704 req.repo.ui.setconfig(*cfg)
705
706 if options['verbose'] or options['debug'] or options['quiet']:
709 if options['verbose'] or options['debug'] or options['quiet']:
707 for opt in ('verbose', 'debug', 'quiet'):
710 for opt in ('verbose', 'debug', 'quiet'):
708 val = str(bool(options[opt]))
711 val = str(bool(options[opt]))
General Comments 0
You need to be logged in to leave comments. Login now