[PATCH 1 of 2] revsetbenchmarks: ignore empty lines

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jun 21 03:38:42 UTC 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1434798805 25200
#      Sat Jun 20 04:13:25 2015 -0700
# Node ID 75305531b0c92e31b35a3357774597ac78b1a1fd
# Parent  7fdd1782fc4ee9da87d8af13e806dc9055db2c38
revsetbenchmarks: ignore empty lines

Before this change, empty lines were seen as an entry and the benchmark tried
to run benchmark for "".

diff --git a/contrib/revsetbenchmarks.py b/contrib/revsetbenchmarks.py
--- a/contrib/revsetbenchmarks.py
+++ b/contrib/revsetbenchmarks.py
@@ -244,10 +244,11 @@ contribdir = os.path.dirname(__file__)
 revsetsfile = sys.stdin
 if options.file:
     revsetsfile = open(options.file)
 
 revsets = [l.strip() for l in revsetsfile if not l.startswith('#')]
+revsets = [l for l in revsets if l]
 
 print "Revsets to benchmark"
 print "----------------------------"
 
 for idx, rset in enumerate(revsets):


More information about the Mercurial-devel mailing list