changeset 21286:f0f810096842

revsetbenchmark: add a usage message when no arguments are passed This increase the odd someone who didn't wrote will it find out how to use this script.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 25 Apr 2014 13:35:31 -0700
parents 7078ce067367
children 2d93b74335a2
files contrib/revsetbenchmarks.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/revsetbenchmarks.py	Tue Apr 29 19:15:36 2014 -0700
+++ b/contrib/revsetbenchmarks.py	Fri Apr 25 13:35:31 2014 -0700
@@ -66,6 +66,10 @@
 
 
 
+if len(sys.argv) < 2:
+    print >> sys.stderr, 'usage: %s <revs> [file]' % sys.argv[0]
+    sys.exit(255)
+
 target_rev = sys.argv[1]
 
 revsetsfile = sys.stdin