changeset 41272:71ef4e923886

revsetbenchmarks: support revset starting with a "-" Before this change, there was no strict separation between arguments and the benchmarked revset. This is easy to fix.
author Boris Feld <boris.feld@octobus.net>
date Mon, 14 Jan 2019 16:01:17 +0100
parents 774b5195fac6
children 5409f7ec7850
files contrib/revsetbenchmarks.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/revsetbenchmarks.py	Thu Jan 17 04:35:33 2019 -0500
+++ b/contrib/revsetbenchmarks.py	Mon Jan 14 16:01:17 2019 +0100
@@ -56,9 +56,11 @@
 def perf(revset, target=None, contexts=False):
     """run benchmark for this very revset"""
     try:
-        args = ['perfrevset', revset]
+        args = ['perfrevset']
         if contexts:
             args.append('--contexts')
+        args.append('--')
+        args.append(revset)
         output = hg(args, repo=target)
         return parseoutput(output)
     except subprocess.CalledProcessError as exc: