Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.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 | bcca357bb792 |
children | 2ecce24dfcd3 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Wed Jun 14 23:56:58 2017 -0400 +++ b/mercurial/debugcommands.py Sat Apr 22 18:42:03 2017 +0900 @@ -2120,14 +2120,12 @@ if newtree != tree: ui.note(("* expanded:\n"), templater.prettyformat(newtree), '\n') - mapfile = None if revs is None: k = 'debugtemplate' t = formatter.maketemplater(ui, k, tmpl) ui.write(templater.stringify(t(k, ui=ui, **props))) else: - displayer = cmdutil.changeset_templater(ui, repo, None, opts, tmpl, - mapfile, buffered=False) + displayer = cmdutil.makelogtemplater(ui, repo, tmpl) for r in revs: displayer.show(repo[r], **props) displayer.close()