Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/dispatch.py @ 14748:1b8c70c9f47c stable
dispatch: make sure unspecified global ui options don't override old values
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 24 Jun 2011 12:16:14 +0300 |
parents | 23325c5ef6a7 |
children | 99ace3cb7352 |
comparison
equal
deleted
inserted
replaced
14746:72e4fcb43227 | 14748:1b8c70c9f47c |
---|---|
590 t = get_times() | 590 t = get_times() |
591 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % | 591 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % |
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') |
606 | 604 |
607 if cmdoptions.get('insecure', False): | 605 if cmdoptions.get('insecure', False): |