# HG changeset patch # User Gregory Szorc # Date 1494093578 25200 # Node ID 6b582f9b6e5efe828f28e31bfaec71787a663513 # Parent d7f93ebbbbdf9a6436f3dfc9b5f3a4f012f7f953 perf: don't clobber startrev variable Previously, the "startrev" argument would be ignored due to "startrev = 0" in the benchmark function. This meant that `hg perfrevlog` always started at revision 0. Rename the local variable to "beginrev" so the variable does the right thing. diff -r d7f93ebbbbdf -r 6b582f9b6e5e contrib/perf.py --- a/contrib/perf.py Fri May 05 17:31:15 2017 +0200 +++ b/contrib/perf.py Sat May 06 10:59:38 2017 -0700 @@ -856,15 +856,15 @@ def d(): r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts) - startrev = 0 + beginrev = startrev endrev = _len(r) dist = opts['dist'] if reverse: - startrev, endrev = endrev, startrev + beginrev, endrev = endrev, beginrev dist = -1 * dist - for x in xrange(startrev, endrev, dist): + for x in xrange(beginrev, endrev, dist): r.revision(r.node(x)) timer(d)