changeset 38819:a4d847cea6f8

perfmoonwalk: make work with filtered repo This also fixes the out-of-range "len(repo)" that weirdly works (and gets the nullid). I suspect it wasn't intentional to include the timing of reading the null revision. Differential Revision: https://phab.mercurial-scm.org/D4017
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 20 Jul 2018 11:37:31 -0700
parents 83a505b5cf85
children ddb15a83ae0b
files contrib/perf.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Fri Jul 20 11:17:33 2018 -0700
+++ b/contrib/perf.py	Fri Jul 20 11:37:31 2018 -0700
@@ -923,7 +923,7 @@
     """
     timer, fm = gettimer(ui, opts)
     def moonwalk():
-        for i in xrange(len(repo), -1, -1):
+        for i in repo.changelog.revs(start=(len(repo) - 1), stop=-1):
             ctx = repo[i]
             ctx.branch() # read changelog data (in addition to the index)
     timer(moonwalk)