mercurial/streamclone.py
changeset 33411 50b49bb0fff3
parent 33410 c784308305c6
child 33499 0407a51b9d8c
equal deleted inserted replaced
33410:c784308305c6 33411:50b49bb0fff3
   219         for name, size in entries:
   219         for name, size in entries:
   220             if debugflag:
   220             if debugflag:
   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             # auditing at this stage is both pointless (paths are already
       
   225             # trusted by the local repo) and expensive
   224             with svfs(name, 'rb', auditpath=False) as fp:
   226             with svfs(name, 'rb', auditpath=False) as fp:
   225                 if size <= 65536:
   227                 if size <= 65536:
   226                     yield fp.read(size)
   228                     yield fp.read(size)
   227                 else:
   229                 else:
   228                     for chunk in util.filechunkiter(fp, limit=size):
   230                     for chunk in util.filechunkiter(fp, limit=size):