equal
deleted
inserted
replaced
204 if debugflag: |
204 if debugflag: |
205 repo.ui.debug('sending %s (%d bytes)\n' % (name, size)) |
205 repo.ui.debug('sending %s (%d bytes)\n' % (name, size)) |
206 # partially encode name over the wire for backwards compat |
206 # partially encode name over the wire for backwards compat |
207 yield '%s\0%d\n' % (store.encodedir(name), size) |
207 yield '%s\0%d\n' % (store.encodedir(name), size) |
208 if size <= 65536: |
208 if size <= 65536: |
209 yield svfs.read(name) |
209 with svfs(name, 'rb') as fp: |
|
210 yield fp.read(size) |
210 else: |
211 else: |
211 for chunk in util.filechunkiter(svfs(name), limit=size): |
212 for chunk in util.filechunkiter(svfs(name), limit=size): |
212 yield chunk |
213 yield chunk |
213 finally: |
214 finally: |
214 svfs.mustaudit = oldaudit |
215 svfs.mustaudit = oldaudit |