revsetbenchmark: add a usage message when no arguments are passed
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 25 Apr 2014 13:35:31 -0700
changeset 21286 f0f810096842
parent 21285 7078ce067367
child 21287 2d93b74335a2
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.
contrib/revsetbenchmarks.py
--- 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