comparison contrib/perf.py @ 40143:d5d28d360a19

pref: support negative indexing in perfrevlogrevisions This is useful to check for a consistent final slice in multiple different repositories.
author Boris Feld <boris.feld@octobus.net>
date Mon, 01 Oct 2018 17:23:54 +0200
parents 25ce80ce84c5
children acf560bc9b56
comparison
equal deleted inserted replaced
40142:25ce80ce84c5 40143:d5d28d360a19
1521 opts = _byteskwargs(opts) 1521 opts = _byteskwargs(opts)
1522 1522
1523 rl = cmdutil.openrevlog(repo, b'perfrevlogrevisions', file_, opts) 1523 rl = cmdutil.openrevlog(repo, b'perfrevlogrevisions', file_, opts)
1524 rllen = getlen(ui)(rl) 1524 rllen = getlen(ui)(rl)
1525 1525
1526 if startrev < 0:
1527 startrev = rllen + startrev
1528
1526 def d(): 1529 def d():
1527 rl.clearcaches() 1530 rl.clearcaches()
1528 1531
1529 beginrev = startrev 1532 beginrev = startrev
1530 endrev = rllen 1533 endrev = rllen