Mercurial > hg
diff hgext/churn.py @ 32837:50586a0a946f
cmdutil: factor out helper to create changeset_templater with literal template
changeset_templater has lots of arguments, but most callers only need to
specify a literal template 'tmpl'.
"hg debugtemplate" has no diff option, which means 'opts' were effectively {},
so dropped opts.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 22 Apr 2017 18:42:03 +0900 |
parents | 04baab18d60a |
children | 26ed66ab1e72 |
line wrap: on
line diff
--- a/hgext/churn.py Wed Jun 14 23:56:58 2017 -0400 +++ b/hgext/churn.py Sat Apr 22 18:42:03 2017 +0900 @@ -32,9 +32,6 @@ # leave the attribute unspecified. testedwith = 'ships-with-hg-core' -def maketemplater(ui, repo, tmpl): - return cmdutil.changeset_templater(ui, repo, False, None, tmpl, None, False) - def changedlines(ui, repo, ctx1, ctx2, fns): added, removed = 0, 0 fmatch = scmutil.matchfiles(repo, fns) @@ -55,7 +52,7 @@ return date.strftime(opts['dateformat']) else: tmpl = opts.get('oldtemplate') or opts.get('template') - tmpl = maketemplater(ui, repo, tmpl) + tmpl = cmdutil.makelogtemplater(ui, repo, tmpl) def getkey(ctx): ui.pushbuffer() tmpl.show(ctx)