# HG changeset patch # User Pierre-Yves David # Date 1433901184 25200 # Node ID caff256205eadc4133fae9d7773e8a33189b419d # Parent c1e24e1fd45fec46d84d3109126e3f1ee234eb2d revsetbenchmarks: improve revision printing We now print the revision number and short hash inline. As a result we drop the crappy list printing. diff -r c1e24e1fd45f -r caff256205ea 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()