changeset 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 ac70f8d5987c
children 88a53081fb21
files mercurial/dispatch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Tue Jun 21 16:55:21 2011 +0300
+++ b/mercurial/dispatch.py	Tue Jun 21 17:08:21 2011 +0300
@@ -654,7 +654,7 @@
         return runcommand(lui, repo, cmd, fullargs, ui, options, d,
                           cmdpats, cmdoptions)
     finally:
-        if repo:
+        if repo != req.repo:
             repo.close()
 
 def _runcommand(ui, options, cmd, cmdfunc):