diff mercurial/bundlerepo.py @ 12962:ff083040a555 stable

bundlerepository: get rid of temporary bundle files (issue2478) This bug was introduced in 40935b59518b and 6277a9469dff.
author Klaus Koch <kuk42@gmx.net>
date Sun, 07 Nov 2010 20:18:57 +0100
parents ad63e5f834e1
children 57d433f632b7
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Wed Nov 10 15:38:00 2010 +0100
+++ b/mercurial/bundlerepo.py	Sun Nov 07 20:18:57 2010 +0100
@@ -249,6 +249,8 @@
     def close(self):
         """Close assigned bundle file immediately."""
         self.bundle.close()
+        if self.tempfile is not None:
+            os.unlink(self.tempfile)
 
     def __del__(self):
         del self.bundle