Mercurial > hg-stable
changeset 39279:bb2b462f81da
fastannotate: pconvert paths from the server for Windows
I'm guessing that the right thing to do here is to convert the paths on the
server, but I know this is a WIP, and I don't know where that needs to happen.
I'm just trying to eliminate the malicious path warnings in the tests.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 21 Aug 2018 22:49:08 -0400 |
parents | 659f010ffa7e |
children | 9a81f126f9fa |
files | hgext/fastannotate/protocol.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fastannotate/protocol.py Tue Aug 21 22:34:32 2018 -0400 +++ b/hgext/fastannotate/protocol.py Tue Aug 21 22:49:08 2018 -0400 @@ -15,6 +15,7 @@ extensions, hg, localrepo, + util, wireprotov1peer, wireprotov1server, ) @@ -166,6 +167,8 @@ ui.debug('fastannotate: server returned\n') for result in results: r = result.result() + # TODO: pconvert these paths on the server? + r = {util.pconvert(p): v for p, v in r.iteritems()} for path in sorted(r): # ignore malicious paths if not path.startswith('fastannotate/') or '/../' in (path + '/'):