##// END OF EJS Templates
dispatch: make sure unspecified global ui options don't override old values
Idan Kamara -
r14748:1b8c70c9 stable
parent child Browse files
Show More
@@ -592,14 +592,12 b' def _dispatch(req):'
592 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
592 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
593 atexit.register(print_time)
593 atexit.register(print_time)
594
594
595 if options['verbose'] or options['debug'] or options['quiet']:
595 for opt in ('verbose', 'debug', 'quiet', 'traceback'):
596 for ui_ in (ui, lui):
596 val = bool(options[opt])
597 ui_.setconfig('ui', 'verbose', str(bool(options['verbose'])))
597 if val:
598 ui_.setconfig('ui', 'debug', str(bool(options['debug'])))
598 for ui_ in (ui, lui):
599 ui_.setconfig('ui', 'quiet', str(bool(options['quiet'])))
599 ui_.setconfig('ui', opt, str(val))
600 if options['traceback']:
600
601 for ui_ in (ui, lui):
602 ui_.setconfig('ui', 'traceback', 'on')
603 if options['noninteractive']:
601 if options['noninteractive']:
604 for ui_ in (ui, lui):
602 for ui_ in (ui, lui):
605 ui_.setconfig('ui', 'interactive', 'off')
603 ui_.setconfig('ui', 'interactive', 'off')
@@ -54,6 +54,12 b' issue1829: wrong indentation'
54 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
54 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
55 $ unset FAKEPATH
55 $ unset FAKEPATH
56
56
57 make sure unspecified global ui options don't override old values
58
59 $ hg showconfig --config ui.verbose=True --quiet
60 ui.verbose=True
61 ui.quiet=True
62
57 username expansion
63 username expansion
58
64
59 $ olduser=$HGUSER
65 $ olduser=$HGUSER
@@ -134,9 +140,7 b' plain hgrc'
134 $ hg showconfig --config ui.traceback=True --debug
140 $ hg showconfig --config ui.traceback=True --debug
135 read config from: $TESTTMP/hgrc
141 read config from: $TESTTMP/hgrc
136 none: ui.traceback=True
142 none: ui.traceback=True
137 none: ui.verbose=False
138 none: ui.debug=True
143 none: ui.debug=True
139 none: ui.quiet=False
140
144
141 plain mode with exceptions
145 plain mode with exceptions
142
146
@@ -152,24 +156,18 b' plain mode with exceptions'
152 read config from: $TESTTMP/hgrc
156 read config from: $TESTTMP/hgrc
153 $TESTTMP/hgrc:15: extensions.plain=./plain.py
157 $TESTTMP/hgrc:15: extensions.plain=./plain.py
154 none: ui.traceback=True
158 none: ui.traceback=True
155 none: ui.verbose=False
156 none: ui.debug=True
159 none: ui.debug=True
157 none: ui.quiet=False
158 $ unset HGPLAIN
160 $ unset HGPLAIN
159 $ hg showconfig --config ui.traceback=True --debug
161 $ hg showconfig --config ui.traceback=True --debug
160 plain: True
162 plain: True
161 read config from: $TESTTMP/hgrc
163 read config from: $TESTTMP/hgrc
162 $TESTTMP/hgrc:15: extensions.plain=./plain.py
164 $TESTTMP/hgrc:15: extensions.plain=./plain.py
163 none: ui.traceback=True
165 none: ui.traceback=True
164 none: ui.verbose=False
165 none: ui.debug=True
166 none: ui.debug=True
166 none: ui.quiet=False
167 $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
167 $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
168 $ hg showconfig --config ui.traceback=True --debug
168 $ hg showconfig --config ui.traceback=True --debug
169 plain: True
169 plain: True
170 read config from: $TESTTMP/hgrc
170 read config from: $TESTTMP/hgrc
171 $TESTTMP/hgrc:15: extensions.plain=./plain.py
171 $TESTTMP/hgrc:15: extensions.plain=./plain.py
172 none: ui.traceback=True
172 none: ui.traceback=True
173 none: ui.verbose=False
174 none: ui.debug=True
173 none: ui.debug=True
175 none: ui.quiet=False
General Comments 0
You need to be logged in to leave comments. Login now