changeset 25538:caff256205ea

revsetbenchmarks: improve revision printing We now print the revision number and short hash inline. As a result we drop the crappy list printing.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 09 Jun 2015 18:53:04 -0700
parents c1e24e1fd45f
children 460922c95643
files contrib/revsetbenchmarks.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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()