# HG changeset patch # User Boris Feld # Date 1527780706 -7200 # Node ID 6b91815fcdce8add62e3ce781bea34eb1240baa7 # Parent 1b121cc680f256afe60dd2ef3dcc619b88a638a5 perftemplating: move template formating into its own function The lambda is not practical when time will come to alter the benchmark code. diff -r 1b121cc680f2 -r 6b91815fcdce contrib/perf.py --- a/contrib/perf.py Thu May 31 18:05:15 2018 +0200 +++ b/contrib/perf.py Thu May 31 17:31:46 2018 +0200 @@ -899,11 +899,14 @@ @command('perftemplating', formatteropts) def perftemplating(ui, repo, *revs, **opts): + def format(): + commands.log(ui, repo, rev=revs, date='', user='', + template='{date|shortdate} [{rev}:{node|short}]' + ' {author|person}: {desc|firstline}\n') + timer, fm = gettimer(ui, opts) ui.pushbuffer() - timer(lambda: commands.log(ui, repo, rev=revs, date='', user='', - template='{date|shortdate} [{rev}:{node|short}]' - ' {author|person}: {desc|firstline}\n')) + timer(format) ui.popbuffer() fm.end()