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