Merge with crew-stable
authorPatrick Mezard <pmezard@gmail.com>
Sun, 03 Jan 2010 20:36:30 +0100
changeset 10204 3ca8f2ae5fee
parent 10202 dcaa80294c79 (current diff)
parent 10203 6e26e3c2083f (diff)
child 10205 45885e8f5704
Merge with crew-stable
mercurial/patch.py
--- 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