mercurial/patch.py
changeset 10204 3ca8f2ae5fee
parent 10189 e451e599fbcf
parent 10203 6e26e3c2083f
child 10264 d6512b3e9ac0
--- a/mercurial/patch.py	Sun Jan 03 18:16:42 2010 +0100
+++ b/mercurial/patch.py	Sun Jan 03 20:36:30 2010 +0100
@@ -1166,6 +1166,8 @@
     finally:
         if cwd:
             os.chdir(curdir)
+        if fp != patchobj:
+            fp.close()
     if ret < 0:
         raise PatchError
     return ret > 0