[PATCH 3 of 5] dispatch: set global options on the request repo.ui
Idan Kamara
idankk86 at gmail.com
Fri Jun 24 11:51:01 CDT 2011
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1308933898 -10800
# Branch stable
# Node ID ebf2838057fe29675dda9e20d9e902eeca846407
# Parent 469e64e3674f4cf54a181dcbf85826e14313e45c
dispatch: set global options on the request repo.ui
If the request has a repo, and global options such as --verbose are passed,
we need to set those explicitly on the repo.ui.
diff -r 469e64e3674f -r ebf2838057fe mercurial/dispatch.py
--- a/mercurial/dispatch.py Fri Jun 24 19:44:17 2011 +0300
+++ b/mercurial/dispatch.py Fri Jun 24 19:44:58 2011 +0300
@@ -592,18 +592,23 @@
(t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
atexit.register(print_time)
+ uis = set([ui, lui])
+
+ if req.repo:
+ uis.add(req.repo.ui)
+
for opt in ('verbose', 'debug', 'quiet', 'traceback'):
val = bool(options[opt])
if val:
- for ui_ in (ui, lui):
+ for ui_ in uis:
ui_.setconfig('ui', opt, str(val))
if options['noninteractive']:
- for ui_ in (ui, lui):
+ for ui_ in uis:
ui_.setconfig('ui', 'interactive', 'off')
if cmdoptions.get('insecure', False):
- for ui_ in (ui, lui):
+ for ui_ in uis:
ui_.setconfig('web', 'cacerts', '')
if options['help']:
More information about the Mercurial-devel
mailing list