changeset 22556:480a24ad9f77

revsetbenchmark: allow comments ('#' prefix) in the revset input
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 23 Sep 2014 17:09:19 -0700
parents 2143d794e960
children ace8320156ef
files contrib/revsetbenchmarks.py contrib/revsetbenchmarks.txt
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/revsetbenchmarks.py	Tue Sep 23 17:08:49 2014 -0700
+++ b/contrib/revsetbenchmarks.py	Tue Sep 23 17:09:19 2014 -0700
@@ -94,7 +94,7 @@
 if options.file:
     revsetsfile = open(options.file)
 
-revsets = [l.strip() for l in revsetsfile]
+revsets = [l.strip() for l in revsetsfile if not l.startswith('#')]
 
 print "Revsets to benchmark"
 print "----------------------------"
--- a/contrib/revsetbenchmarks.txt	Tue Sep 23 17:08:49 2014 -0700
+++ b/contrib/revsetbenchmarks.txt	Tue Sep 23 17:09:19 2014 -0700
@@ -14,7 +14,9 @@
 min(0:tip)
 0::
 min(0::)
+# those two `roots(...)` inputs are close to what phase movement use.
 roots((tip~100::) - (tip~100::tip))
+roots((0::) - (0::tip))
 ::p1(p1(tip))::
 public()
 :10000 and public()
@@ -23,7 +25,6 @@
 max(::(tip~20) - obsolete())
 roots((0:tip)::)
 (not public() - obsolete())
-roots((0::) - (0::tip))
 (_intlist('20000\x0020001')) and merge()
 parents(20000)
 (20000::) - (20000)