comparison mercurial/dispatch.py @ 14601:25c1f3ddd927

dispatch: propagate ui command options to the local ui (issue2523) so the ui object passed to pre/post python hooks has the verbose flag (and the rest) set correctly
author Idan Kamara <idankk86@gmail.com>
date Mon, 13 Jun 2011 00:19:26 +0300
parents eccbb9980ada
children ea8938d3a5aa
comparison
equal deleted inserted replaced
14600:17c16bcf6926 14601:25c1f3ddd927
570 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % 570 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") %
571 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) 571 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
572 atexit.register(print_time) 572 atexit.register(print_time)
573 573
574 if options['verbose'] or options['debug'] or options['quiet']: 574 if options['verbose'] or options['debug'] or options['quiet']:
575 ui.setconfig('ui', 'verbose', str(bool(options['verbose']))) 575 for ui in (ui, lui):
576 ui.setconfig('ui', 'debug', str(bool(options['debug']))) 576 ui.setconfig('ui', 'verbose', str(bool(options['verbose'])))
577 ui.setconfig('ui', 'quiet', str(bool(options['quiet']))) 577 ui.setconfig('ui', 'debug', str(bool(options['debug'])))
578 ui.setconfig('ui', 'quiet', str(bool(options['quiet'])))
578 if options['traceback']: 579 if options['traceback']:
579 ui.setconfig('ui', 'traceback', 'on') 580 for ui in (ui, lui):
581 ui.setconfig('ui', 'traceback', 'on')
580 if options['noninteractive']: 582 if options['noninteractive']:
581 ui.setconfig('ui', 'interactive', 'off') 583 for ui in (ui, lui):
584 ui.setconfig('ui', 'interactive', 'off')
582 585
583 if cmdoptions.get('insecure', False): 586 if cmdoptions.get('insecure', False):
584 ui.setconfig('web', 'cacerts', '') 587 for ui in (ui, lui):
588 ui.setconfig('web', 'cacerts', '')
585 589
586 if options['help']: 590 if options['help']:
587 return commands.help_(ui, cmd, options['version']) 591 return commands.help_(ui, cmd, options['version'])
588 elif options['version']: 592 elif options['version']:
589 return commands.version_(ui) 593 return commands.version_(ui)