Mercurial > hg
comparison mercurial/dispatch.py @ 14752:99ace3cb7352 stable
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.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 24 Jun 2011 19:44:58 +0300 |
parents | 1b8c70c9f47c |
children | 10dcb3e7cb55 |
comparison
equal
deleted
inserted
replaced
14751:712954a67be3 | 14752:99ace3cb7352 |
---|---|
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 uis = set([ui, lui]) | |
596 | |
597 if req.repo: | |
598 uis.add(req.repo.ui) | |
599 | |
595 for opt in ('verbose', 'debug', 'quiet', 'traceback'): | 600 for opt in ('verbose', 'debug', 'quiet', 'traceback'): |
596 val = bool(options[opt]) | 601 val = bool(options[opt]) |
597 if val: | 602 if val: |
598 for ui_ in (ui, lui): | 603 for ui_ in uis: |
599 ui_.setconfig('ui', opt, str(val)) | 604 ui_.setconfig('ui', opt, str(val)) |
600 | 605 |
601 if options['noninteractive']: | 606 if options['noninteractive']: |
602 for ui_ in (ui, lui): | 607 for ui_ in uis: |
603 ui_.setconfig('ui', 'interactive', 'off') | 608 ui_.setconfig('ui', 'interactive', 'off') |
604 | 609 |
605 if cmdoptions.get('insecure', False): | 610 if cmdoptions.get('insecure', False): |
606 for ui_ in (ui, lui): | 611 for ui_ in uis: |
607 ui_.setconfig('web', 'cacerts', '') | 612 ui_.setconfig('web', 'cacerts', '') |
608 | 613 |
609 if options['help']: | 614 if options['help']: |
610 return commands.help_(ui, cmd, options['version']) | 615 return commands.help_(ui, cmd, options['version']) |
611 elif options['version']: | 616 elif options['version']: |