Mercurial > public > mercurial-scm > hg-stable
diff hgext/keyword.py @ 32855: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 | 69d1c3ea0d6f |
line wrap: on
line diff
--- a/hgext/keyword.py Wed Jun 14 23:56:58 2017 -0400 +++ b/hgext/keyword.py Sat Apr 22 18:42:03 2017 +0900 @@ -239,8 +239,8 @@ '''Replaces keywords in data with expanded template.''' def kwsub(mobj): kw = mobj.group(1) - ct = cmdutil.changeset_templater(self.ui, self.repo, False, None, - self.templates[kw], '', False) + ct = cmdutil.makelogtemplater(self.ui, self.repo, + self.templates[kw]) self.ui.pushbuffer() ct.show(ctx, root=self.repo.root, file=path) ekw = templatefilters.firstline(self.ui.popbuffer())