Mercurial > public > mercurial-scm > hg-stable
diff hgext/fastannotate/protocol.py @ 39239:c8a40b33ce30
fastannotate: write out files from server in a predictable order
This is mostly for test output stabilization, but it *might* be
slightly better with a ton of annotate caches because we'll write to
one directory at a time rather than bouncing around randomly.
Differential Revision: https://phab.mercurial-scm.org/D3995
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 01 Aug 2018 11:10:41 -0400 |
parents | 1ddb296e0dee |
children | 303dae0136b0 |
line wrap: on
line diff
--- a/hgext/fastannotate/protocol.py Mon Jul 30 22:50:00 2018 -0400 +++ b/hgext/fastannotate/protocol.py Wed Aug 01 11:10:41 2018 -0400 @@ -185,11 +185,13 @@ ui.debug('fastannotate: server returned\n') for result in results: - for path, content in result.result().iteritems(): + r = result.result() + for path in sorted(r): # ignore malicious paths if not path.startswith('fastannotate/') or '/../' in (path + '/'): ui.debug('fastannotate: ignored malicious path %s\n' % path) continue + content = r[path] if ui.debugflag: ui.debug('fastannotate: writing %d bytes to %s\n' % (len(content), path))