mercurial/bundlerepo.py
changeset 12347 6277a9469dff
parent 12335 e21fe9c5fb25
child 12734 5dfd1c49dcc5
--- a/mercurial/bundlerepo.py	Mon Sep 20 16:00:15 2010 -0500
+++ b/mercurial/bundlerepo.py	Mon Sep 20 16:14:05 2010 -0500
@@ -177,7 +177,6 @@
         f = open(bundlename, "rb")
         self.bundle = changegroup.readbundle(f, bundlename)
         if self.bundle.compressed():
-            # we need a seekable, decompressed bundle
             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
                                             suffix=".hg10un", dir=self.path)
             self.tempfile = temp
@@ -247,6 +246,10 @@
         else:
             return filelog.filelog(self.sopener, f)
 
+    def close(self):
+        """Close assigned bundle file immediately."""
+        self.bundle.close()
+
     def __del__(self):
         del self.bundle
         if tempfile is not None: