##// END OF EJS Templates
wireproto: don't audit local paths during stream_out...
Bryan O'Sullivan -
r17556:39c6e349 default
parent child Browse files
Show More
@@ -545,12 +545,20 b' def stream(repo, proto):'
545 repo.ui.debug('%d files, %d bytes to transfer\n' %
545 repo.ui.debug('%d files, %d bytes to transfer\n' %
546 (len(entries), total_bytes))
546 (len(entries), total_bytes))
547 yield '%d %d\n' % (len(entries), total_bytes)
547 yield '%d %d\n' % (len(entries), total_bytes)
548 for name, size in entries:
548
549 repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
549 sopener = repo.sopener
550 # partially encode name over the wire for backwards compat
550 oldaudit = sopener.mustaudit
551 yield '%s\0%d\n' % (store.encodedir(name), size)
551 sopener.mustaudit = False
552 for chunk in util.filechunkiter(repo.sopener(name), limit=size):
552
553 yield chunk
553 try:
554 for name, size in entries:
555 repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
556 # partially encode name over the wire for backwards compat
557 yield '%s\0%d\n' % (store.encodedir(name), size)
558 for chunk in util.filechunkiter(sopener(name), limit=size):
559 yield chunk
560 finally:
561 sopener.mustaudit = oldaudit
554
562
555 return streamres(streamer(repo, entries, total_bytes))
563 return streamres(streamer(repo, entries, total_bytes))
556
564
General Comments 0
You need to be logged in to leave comments. Login now