Patchwork [1,of,2] revsetbenchmarks: ignore empty lines

login
register
mail settings
Submitter Pierre-Yves David
Date June 21, 2015, 3:38 a.m.
Message ID <75305531b0c92e31b35a.1434857922@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9737/
State Accepted
Commit b66bb73ecd291db85e56ca52f3af2353aedb8d84
Headers show

Comments

Pierre-Yves David - June 21, 2015, 3:38 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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 "".

Patch

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):