contrib/revsetbenchmarks.py
changeset 25535 6d1e456645c9
parent 25534 43e5a6819aba
child 25536 f3f1b4b86b35
--- a/contrib/revsetbenchmarks.py	Tue Jun 09 17:15:48 2015 -0700
+++ b/contrib/revsetbenchmarks.py	Tue Jun 09 18:39:55 2015 -0700
@@ -4,11 +4,9 @@
 # defined by parameter. Checkout one by one and run perfrevset with every
 # revset in the list to benchmark its performance.
 #
-# - First argument is a revset of mercurial own repo to runs against.
-# - Second argument is the file from which the revset array will be taken
-#   If second argument is omitted read it from standard input
+# You should run this from the root of your mercurial repository.
 #
-# You should run this from the root of your mercurial repository.
+# call with --help for details
 #
 # This script also does one run of the current version of mercurial installed
 # to compare performance.
@@ -148,15 +146,13 @@
 
 (options, args) = parser.parse_args()
 
-if len(sys.argv) < 2:
+if not args:
     parser.print_help()
     sys.exit(255)
 
 # the directory where both this script and the perf.py extension live.
 contribdir = os.path.dirname(__file__)
 
-target_rev = args[0]
-
 revsetsfile = sys.stdin
 if options.file:
     revsetsfile = open(options.file)
@@ -172,8 +168,9 @@
 print "----------------------------"
 print
 
-
-revs = getrevs(target_rev)
+revs = []
+for a in args:
+    revs.extend(getrevs(a))
 
 results = []
 for r in revs: