Mercurial > hg
diff mercurial/bundlerepo.py @ 12347:6277a9469dff
bundlerepo: restore close() method
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 20 Sep 2010 16:14:05 -0500 |
parents | e21fe9c5fb25 |
children | 5dfd1c49dcc5 |
line wrap: on
line diff
--- 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: