perftemplating: fix the revisions argument
authorBoris Feld <boris.feld@octobus.net>
Thu, 31 May 2018 18:05:15 +0200
changeset 38265 1b121cc680f2
parent 38264 a4aa77b84efd
child 38266 6b91815fcdce
perftemplating: fix the revisions argument Before this change, the argument passed to log where a string instead of a list of string. This meant only single character rev were supported... We now properly accepts argument of any length. We also make it possible to specify multiple REV arguments in the same go.
contrib/perf.py
--- a/contrib/perf.py	Sat Jun 09 15:14:31 2018 +0530
+++ b/contrib/perf.py	Thu May 31 18:05:15 2018 +0200
@@ -898,12 +898,10 @@
     fm.end()
 
 @command('perftemplating', formatteropts)
-def perftemplating(ui, repo, rev=None, **opts):
-    if rev is None:
-        rev=[]
+def perftemplating(ui, repo, *revs, **opts):
     timer, fm = gettimer(ui, opts)
     ui.pushbuffer()
-    timer(lambda: commands.log(ui, repo, rev=rev, date='', user='',
+    timer(lambda: commands.log(ui, repo, rev=revs, date='', user='',
                                template='{date|shortdate} [{rev}:{node|short}]'
                                ' {author|person}: {desc|firstline}\n'))
     ui.popbuffer()