##// END OF EJS Templates
dispatch: propagate ui command options to the local ui (issue2523)...
Idan Kamara -
r14601:25c1f3dd default
parent child Browse files
Show More
@@ -572,15 +572,19 b' def _dispatch(req):'
572 572 atexit.register(print_time)
573 573
574 574 if options['verbose'] or options['debug'] or options['quiet']:
575 for ui in (ui, lui):
575 576 ui.setconfig('ui', 'verbose', str(bool(options['verbose'])))
576 577 ui.setconfig('ui', 'debug', str(bool(options['debug'])))
577 578 ui.setconfig('ui', 'quiet', str(bool(options['quiet'])))
578 579 if options['traceback']:
580 for ui in (ui, lui):
579 581 ui.setconfig('ui', 'traceback', 'on')
580 582 if options['noninteractive']:
583 for ui in (ui, lui):
581 584 ui.setconfig('ui', 'interactive', 'off')
582 585
583 586 if cmdoptions.get('insecure', False):
587 for ui in (ui, lui):
584 588 ui.setconfig('web', 'cacerts', '')
585 589
586 590 if options['help']:
@@ -346,6 +346,9 b' preoutgoing hook can prevent outgoing ch'
346 346 > def brokenhook(**args):
347 347 > return 1 + {}
348 348 >
349 > def verbosehook(ui, **args):
350 > ui.note('verbose output from hook\n')
351 >
349 352 > class container:
350 353 > unreachable = 1
351 354 > EOF
@@ -535,3 +538,14 b' commit and update hooks should run after'
535 538 cb9a9f314b8b
536 539 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
537 540
541 make sure --verbose (and --quiet/--debug etc.) are propogated to the local ui
542 that is passed to pre/post hooks
543
544 $ echo '[hooks]' > .hg/hgrc
545 $ echo 'pre-identify = python:hooktests.verbosehook' >> .hg/hgrc
546 $ hg id
547 cb9a9f314b8b
548 $ hg id --verbose
549 calling hook pre-identify: hooktests.verbosehook
550 verbose output from hook
551 cb9a9f314b8b
General Comments 0
You need to be logged in to leave comments. Login now