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.
--- 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)