diff -r 3b165c127690 -r 6277a9469dff mercurial/bundlerepo.py --- 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: