comparison mercurial/dispatch.py @ 14754:189a7562d72e stable

dispatch: set config options on the request repo.ui
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:59 +0300
parents 10dcb3e7cb55
children 1a9256cdf10f
comparison
equal deleted inserted replaced
14753:10dcb3e7cb55 14754:189a7562d72e
528 if shellaliasfn: 528 if shellaliasfn:
529 return shellaliasfn() 529 return shellaliasfn()
530 530
531 # read --config before doing anything else 531 # read --config before doing anything else
532 # (e.g. to change trust settings for reading .hg/hgrc) 532 # (e.g. to change trust settings for reading .hg/hgrc)
533 _parseconfig(ui, _earlygetopt(['--config'], args)) 533 cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
534 534
535 # check for cwd 535 # check for cwd
536 cwd = _earlygetopt(['--cwd'], args) 536 cwd = _earlygetopt(['--cwd'], args)
537 if cwd: 537 if cwd:
538 os.chdir(cwd[-1]) 538 os.chdir(cwd[-1])
599 599
600 uis = set([ui, lui]) 600 uis = set([ui, lui])
601 601
602 if req.repo: 602 if req.repo:
603 uis.add(req.repo.ui) 603 uis.add(req.repo.ui)
604
605 # copy configs that were passed on the cmdline (--config) to the repo ui
606 for cfg in cfgs:
607 req.repo.ui.setconfig(*cfg)
604 608
605 for opt in ('verbose', 'debug', 'quiet', 'traceback'): 609 for opt in ('verbose', 'debug', 'quiet', 'traceback'):
606 val = bool(options[opt]) 610 val = bool(options[opt])
607 if val: 611 if val:
608 for ui_ in uis: 612 for ui_ in uis: