Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 14992:188936b334b1 stable
dispatch: make sure global options on the command line take precedence
So if a user has verbose=True somewhere in his .hgrc files, giving -q
on the command line will override that.
This basically reverts 1b8c70c9f47c.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sat, 30 Jul 2011 21:04:14 +0300 |
parents | 41c3a71c318d |
children | f6a737357195 f4b7be3f8430 |
comparison
equal
deleted
inserted
replaced
14991:4f39610996fa | 14992:188936b334b1 |
---|---|
606 | 606 |
607 # copy configs that were passed on the cmdline (--config) to the repo ui | 607 # copy configs that were passed on the cmdline (--config) to the repo ui |
608 for cfg in cfgs: | 608 for cfg in cfgs: |
609 req.repo.ui.setconfig(*cfg) | 609 req.repo.ui.setconfig(*cfg) |
610 | 610 |
611 for opt in ('verbose', 'debug', 'quiet', 'traceback'): | 611 if options['verbose'] or options['debug'] or options['quiet']: |
612 val = bool(options[opt]) | 612 for opt in ('verbose', 'debug', 'quiet'): |
613 if val: | 613 val = str(bool(options[opt])) |
614 for ui_ in uis: | 614 for ui_ in uis: |
615 ui_.setconfig('ui', opt, str(val)) | 615 ui_.setconfig('ui', opt, val) |
616 | |
617 if options['traceback']: | |
618 for ui_ in uis: | |
619 ui_.setconfig('ui', 'traceback', 'on') | |
616 | 620 |
617 if options['noninteractive']: | 621 if options['noninteractive']: |
618 for ui_ in uis: | 622 for ui_ in uis: |
619 ui_.setconfig('ui', 'interactive', 'off') | 623 ui_.setconfig('ui', 'interactive', 'off') |
620 | 624 |