mercurial/dispatch.py
branchstable
changeset 14727 d4b9d3b91ce7
parent 14712 8a62bae94425
child 14743 84a680daa4b2
--- a/mercurial/dispatch.py	Fri Jun 24 12:37:29 2011 +0200
+++ b/mercurial/dispatch.py	Fri Jun 24 16:30:43 2011 +0300
@@ -654,7 +654,7 @@
         return runcommand(lui, repo, cmd, fullargs, ui, options, d,
                           cmdpats, cmdoptions)
     finally:
-        if repo != req.repo:
+        if repo and repo != req.repo:
             repo.close()
 
 def _runcommand(ui, options, cmd, cmdfunc):