Show More
@@ -245,17 +245,14 b' class bundlerepository(localrepo.localre' | |||||
245 | fdtemp, temp = self.vfs.mkstemp(prefix="hg-bundle-", |
|
245 | fdtemp, temp = self.vfs.mkstemp(prefix="hg-bundle-", | |
246 | suffix=".hg10un") |
|
246 | suffix=".hg10un") | |
247 | self.tempfile = temp |
|
247 | self.tempfile = temp | |
248 | fptemp = os.fdopen(fdtemp, 'wb') |
|
|||
249 |
|
248 | |||
250 | try: |
|
249 | with os.fdopen(fdtemp, 'wb') as fptemp: | |
251 | fptemp.write(header) |
|
250 | fptemp.write(header) | |
252 | while True: |
|
251 | while True: | |
253 | chunk = read(2**18) |
|
252 | chunk = read(2**18) | |
254 | if not chunk: |
|
253 | if not chunk: | |
255 | break |
|
254 | break | |
256 | fptemp.write(chunk) |
|
255 | fptemp.write(chunk) | |
257 | finally: |
|
|||
258 | fptemp.close() |
|
|||
259 |
|
256 | |||
260 | return self.vfs.open(self.tempfile, mode="rb") |
|
257 | return self.vfs.open(self.tempfile, mode="rb") | |
261 | self._tempparent = None |
|
258 | self._tempparent = None |
General Comments 0
You need to be logged in to leave comments.
Login now