# HG changeset patch # User Yuya Nishihara # Date 2017-07-07 14:19:31 # Node ID 50b49bb0fff33aca0c7b3d423729d48eb1ba1892 # Parent c784308305c6cdd4f968ea54e79ca8a71f172103 streamclone: comment why path auditing is disabled in generatev1() Copied from 39c6e349dfff. I wasn't sure whether it's for optimization or suppressing unwanted error. diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py --- a/mercurial/streamclone.py +++ b/mercurial/streamclone.py @@ -221,6 +221,8 @@ def generatev1(repo): repo.ui.debug('sending %s (%d bytes)\n' % (name, size)) # partially encode name over the wire for backwards compat yield '%s\0%d\n' % (store.encodedir(name), size) + # auditing at this stage is both pointless (paths are already + # trusted by the local repo) and expensive with svfs(name, 'rb', auditpath=False) as fp: if size <= 65536: yield fp.read(size)