mercurial/patch.py
branchstable
changeset 10203 6e26e3c2083f
parent 10135 9a4034b630c4
child 10204 3ca8f2ae5fee
child 10263 25e572394f5c
--- a/mercurial/patch.py	Sun Jan 03 17:26:39 2010 +0100
+++ b/mercurial/patch.py	Sun Jan 03 19:47:07 2010 +0100
@@ -1126,6 +1126,8 @@
     finally:
         if cwd:
             os.chdir(curdir)
+        if fp != patchobj:
+            fp.close()
     if ret < 0:
         raise PatchError
     return ret > 0