comparison mercurial/dispatch.py @ 14744:23325c5ef6a7 stable

dispatch: set descriptors on the request repo.ui
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:38:28 +0300
parents 84a680daa4b2
children 1b8c70c9f47c
comparison
equal deleted inserted replaced
14743:84a680daa4b2 14744:23325c5ef6a7
620 if cmd not in commands.norepo.split(): 620 if cmd not in commands.norepo.split():
621 # use the repo from the request only if we don't have -R 621 # use the repo from the request only if we don't have -R
622 if not rpath: 622 if not rpath:
623 repo = req.repo 623 repo = req.repo
624 624
625 if not repo: 625 if repo:
626 # set the descriptors of the repo ui to those of ui
627 repo.ui.fin = ui.fin
628 repo.ui.fout = ui.fout
629 repo.ui.ferr = ui.ferr
630 else:
626 try: 631 try:
627 repo = hg.repository(ui, path=path) 632 repo = hg.repository(ui, path=path)
628 if not repo.local(): 633 if not repo.local():
629 raise util.Abort(_("repository '%s' is not local") % path) 634 raise util.Abort(_("repository '%s' is not local") % path)
630 repo.ui.setconfig("bundle", "mainreporoot", repo.root) 635 repo.ui.setconfig("bundle", "mainreporoot", repo.root)