##// END OF EJS Templates
bundlerepo: treat temporarily extracted bundle file via vfs
FUJIWARA Katsunori -
r20981:4fdd1172 default
parent child Browse files
Show More
@@ -204,8 +204,8 b' class bundlerepository(localrepo.localre'
204 204 f = util.posixfile(bundlename, "rb")
205 205 self.bundle = changegroup.readbundle(f, bundlename)
206 206 if self.bundle.compressed():
207 fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
208 suffix=".hg10un", dir=self.path)
207 fdtemp, temp = self.vfs.mkstemp(prefix="hg-bundle-",
208 suffix=".hg10un")
209 209 self.tempfile = temp
210 210 fptemp = os.fdopen(fdtemp, 'wb')
211 211
@@ -219,8 +219,8 b' class bundlerepository(localrepo.localre'
219 219 finally:
220 220 fptemp.close()
221 221
222 f = util.posixfile(self.tempfile, "rb")
223 self.bundle = changegroup.readbundle(f, bundlename)
222 f = self.vfs.open(self.tempfile, mode="rb")
223 self.bundle = changegroup.readbundle(f, bundlename, self.vfs)
224 224
225 225 # dict with the mapping 'filename' -> position in the bundle
226 226 self.bundlefilespos = {}
@@ -280,7 +280,7 b' class bundlerepository(localrepo.localre'
280 280 """Close assigned bundle file immediately."""
281 281 self.bundle.close()
282 282 if self.tempfile is not None:
283 os.unlink(self.tempfile)
283 self.vfs.unlink(self.tempfile)
284 284 if self._tempparent:
285 285 shutil.rmtree(self._tempparent, True)
286 286
General Comments 0
You need to be logged in to leave comments. Login now