bundlerepo: drop unused close() method
authorMatt Mackall <mpm@selenic.com>
Fri, 17 Sep 2010 19:03:13 -0500
changeset 12331 40935b59518b
parent 12330 e527b8635881
child 12332 680fe77ab5b8
bundlerepo: drop unused close() method
hgext/transplant.py
mercurial/bundlerepo.py
--- a/hgext/transplant.py	Fri Sep 17 19:02:32 2010 -0500
+++ b/hgext/transplant.py	Fri Sep 17 19:03:13 2010 -0500
@@ -600,7 +600,6 @@
         tp.apply(repo, source, revmap, merges, opts)
     finally:
         if bundle:
-            source.close()
             os.unlink(bundle)
 
 cmdtable = {
--- a/mercurial/bundlerepo.py	Fri Sep 17 19:02:32 2010 -0500
+++ b/mercurial/bundlerepo.py	Fri Sep 17 19:03:13 2010 -0500
@@ -174,6 +174,7 @@
         self.bundlefile = open(bundlename, "rb")
         b = changegroup.readbundle(self.bundlefile, bundlename)
         if b.compressed():
+            # we need a seekable, decompressed bundle
             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
                                             suffix=".hg10un", dir=self.path)
             self.tempfile = temp
@@ -242,10 +243,6 @@
         else:
             return filelog.filelog(self.sopener, f)
 
-    def close(self):
-        """Close assigned bundle file immediately."""
-        self.bundlefile.close()
-
     def __del__(self):
         bundlefile = getattr(self, 'bundlefile', None)
         if bundlefile and not bundlefile.closed: