pref: support negative indexing in perfrevlogrevisions
authorBoris Feld <boris.feld@octobus.net>
Mon, 01 Oct 2018 17:23:54 +0200
changeset 40143 d5d28d360a19
parent 40142 25ce80ce84c5
child 40144 acf560bc9b56
pref: support negative indexing in perfrevlogrevisions This is useful to check for a consistent final slice in multiple different repositories.
contrib/perf.py
--- a/contrib/perf.py	Mon Oct 01 17:37:38 2018 +0200
+++ b/contrib/perf.py	Mon Oct 01 17:23:54 2018 +0200
@@ -1523,6 +1523,9 @@
     rl = cmdutil.openrevlog(repo, b'perfrevlogrevisions', file_, opts)
     rllen = getlen(ui)(rl)
 
+    if startrev < 0:
+        startrev = rllen + startrev
+
     def d():
         rl.clearcaches()