revsetbenchmarks: improve revision printing
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 09 Jun 2015 18:53:04 -0700
changeset 25538 caff256205ea
parent 25537 c1e24e1fd45f
child 25539 460922c95643
revsetbenchmarks: improve revision printing We now print the revision number and short hash inline. As a result we drop the crappy list printing.
contrib/revsetbenchmarks.py
--- a/contrib/revsetbenchmarks.py	Tue Jun 09 18:40:06 2015 -0700
+++ b/contrib/revsetbenchmarks.py	Tue Jun 09 18:53:04 2015 -0700
@@ -82,10 +82,10 @@
 
 def printrevision(rev):
     """print data about a revision"""
-    sys.stdout.write("Revision: ")
+    sys.stdout.write("Revision ")
     sys.stdout.flush()
     check_call(['hg', 'log', '--rev', str(rev), '--template',
-               '{desc|firstline}\n'])
+                '{rev}:{node|short}: {desc|firstline}\n'])
 
 def idxwidth(nbidx):
     """return the max width of number used for index
@@ -196,7 +196,7 @@
 ================
 """
 
-print 'Revision:', revs
+print 'Revision:'
 for idx, rev in enumerate(revs):
     sys.stdout.write('%i) ' % idx)
     sys.stdout.flush()