##// END OF EJS Templates
streamclone: close large revlog files explicitly in generatev1()
Yuya Nishihara -
r33410:c7843083 default
parent child Browse files
Show More
@@ -221,12 +221,11 b' def generatev1(repo):'
221 repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
221 repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
222 # partially encode name over the wire for backwards compat
222 # partially encode name over the wire for backwards compat
223 yield '%s\0%d\n' % (store.encodedir(name), size)
223 yield '%s\0%d\n' % (store.encodedir(name), size)
224 with svfs(name, 'rb', auditpath=False) as fp:
224 if size <= 65536:
225 if size <= 65536:
225 with svfs(name, 'rb', auditpath=False) as fp:
226 yield fp.read(size)
226 yield fp.read(size)
227 else:
227 else:
228 data = svfs(name, auditpath=False)
228 for chunk in util.filechunkiter(fp, limit=size):
229 for chunk in util.filechunkiter(data, limit=size):
230 yield chunk
229 yield chunk
231
230
232 return len(entries), total_bytes, emitrevlogdata()
231 return len(entries), total_bytes, emitrevlogdata()
General Comments 0
You need to be logged in to leave comments. Login now