comparison mercurial/dispatch.py @ 14712:8a62bae94425 stable

dispatch: do not close the request repo Closing here means we've closed the repo passed to us in the request, which is not our responsibility. This is essential for bundlerepo, and possibly other localrepository subclasses who do something in their close().
author Idan Kamara <idankk86@gmail.com>
date Tue, 21 Jun 2011 17:08:21 +0300
parents 8083f4d00bd1
children d4b9d3b91ce7
comparison
equal deleted inserted replaced
14711:ac70f8d5987c 14712:8a62bae94425
652 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) 652 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
653 try: 653 try:
654 return runcommand(lui, repo, cmd, fullargs, ui, options, d, 654 return runcommand(lui, repo, cmd, fullargs, ui, options, d,
655 cmdpats, cmdoptions) 655 cmdpats, cmdoptions)
656 finally: 656 finally:
657 if repo: 657 if repo != req.repo:
658 repo.close() 658 repo.close()
659 659
660 def _runcommand(ui, options, cmd, cmdfunc): 660 def _runcommand(ui, options, cmd, cmdfunc):
661 def checkargs(): 661 def checkargs():
662 try: 662 try: