# HG changeset patch # User Boris Feld # Date 2018-05-31 16:48:08 # Node ID b8f75bc9f6233671884e1c065810a18685469669 # Parent 71d59b487d0c038bf5b9792fcb32a38c9b8c5012 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. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -897,12 +897,14 @@ def perfmoonwalk(ui, repo, **opts): 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}]'