changeset 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
files contrib/perf.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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()