[PATCH 2 of 3] revsetbenchmark: allow comment ('#' prefix) in the revset input

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Sep 23 19:31:17 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1411517359 25200
#      Tue Sep 23 17:09:19 2014 -0700
# Node ID d557d5e8020445bdc3ab5f5b0763eca00d111c04
# Parent  b0b9aadb625d62922eb6dae164b9934f314807db
revsetbenchmark: allow comment ('#' prefix) in the revset input

diff --git a/contrib/revsetbenchmarks.py b/contrib/revsetbenchmarks.py
--- a/contrib/revsetbenchmarks.py
+++ b/contrib/revsetbenchmarks.py
@@ -92,11 +92,11 @@ target_rev = args[0]
 
 revsetsfile = sys.stdin
 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('l')]
 
 print "Revsets to benchmark"
 print "----------------------------"
 
 for idx, rset in enumerate(revsets):
diff --git a/contrib/revsetbenchmarks.txt b/contrib/revsetbenchmarks.txt
--- a/contrib/revsetbenchmarks.txt
+++ b/contrib/revsetbenchmarks.txt
@@ -12,18 +12,19 @@ author(mpm) or author(lmoscovicz)
 tip:0
 max(tip:0)
 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()
 draft()
 :10000 and draft()
 max(::(tip~20) - obsolete())
 roots((0:tip)::)
 (not public() - obsolete())
-roots((0::) - (0::tip))
 (_intlist('20000\x0020001')) and merge()
 parents(20000)
 (20000::) - (20000)


More information about the Mercurial-devel mailing list