equal
deleted
inserted
replaced
13 from mercurial import ( |
13 from mercurial import ( |
14 error, |
14 error, |
15 extensions, |
15 extensions, |
16 hg, |
16 hg, |
17 localrepo, |
17 localrepo, |
|
18 util, |
18 wireprotov1peer, |
19 wireprotov1peer, |
19 wireprotov1server, |
20 wireprotov1server, |
20 ) |
21 ) |
21 from . import context |
22 from . import context |
22 |
23 |
164 {'path': p, 'lastnode':lastnodemap.get(p)})) |
165 {'path': p, 'lastnode':lastnodemap.get(p)})) |
165 |
166 |
166 ui.debug('fastannotate: server returned\n') |
167 ui.debug('fastannotate: server returned\n') |
167 for result in results: |
168 for result in results: |
168 r = result.result() |
169 r = result.result() |
|
170 # TODO: pconvert these paths on the server? |
|
171 r = {util.pconvert(p): v for p, v in r.iteritems()} |
169 for path in sorted(r): |
172 for path in sorted(r): |
170 # ignore malicious paths |
173 # ignore malicious paths |
171 if not path.startswith('fastannotate/') or '/../' in (path + '/'): |
174 if not path.startswith('fastannotate/') or '/../' in (path + '/'): |
172 ui.debug('fastannotate: ignored malicious path %s\n' % path) |
175 ui.debug('fastannotate: ignored malicious path %s\n' % path) |
173 continue |
176 continue |