changeset 38256:b8f75bc9f623

perftemplating: move revision argument to flag only The revision we want to render are less important than the templates. We move revision specification behind the usual `--rev` flag.
author Boris Feld <boris.feld@octobus.net>
date Thu, 31 May 2018 18:48:08 +0200
parents 71d59b487d0c
children a577a199983c
files contrib/perf.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Thu May 31 18:43:15 2018 +0200
+++ b/contrib/perf.py	Thu May 31 18:48:08 2018 +0200
@@ -897,12 +897,14 @@
     timer(moonwalk)
     fm.end()
 
-@command('perftemplating', formatteropts)
-def perftemplating(ui, repo, *revs, **opts):
+@command('perftemplating',
+         [('r', 'rev', [], 'revisions to run the template on'),
+         ] + formatteropts)
+def perftemplating(ui, repo, **opts):
     nullui = ui.copy()
     nullui.fout = open(os.devnull, 'wb')
     nullui.disablepager()
-
+    revs = opts.get('rev')
     def format():
         commands.log(nullui, repo, rev=revs, date='', user='',
                      template='{date|shortdate} [{rev}:{node|short}]'