imported patch /home/thomas/fix-incoming-abortion4.patch
authorThomas Arendsen Hein <thomas@intevation.de>
Sat, 18 Mar 2006 09:13:27 +0100
changeset 1971 915b81a35e46
parent 1970 119165543ce6
child 1972 ce127cb4ee6e
imported patch /home/thomas/fix-incoming-abortion4.patch
mercurial/bundlerepo.py
mercurial/commands.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -206,3 +206,6 @@ class bundlerepository(localrepo.localre
         else:
             return filelog.filelog(self.opener, f)
 
+    def close(self):
+        """Close assigned bundle file immediately."""
+        self.bundlefile.close()
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1811,7 +1811,7 @@ def incoming(ui, repo, source="default",
             ui.write("\n")
 
     if cleanup:
-        os.close(fd)
+        other.close()                   # explicit close for unlink
         os.unlink(cleanup)
 
 def init(ui, dest="."):