diff -r 9fcb6df413c9 -r 2ecce24dfcd3 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Wed Jun 14 20:56:34 2017 -0400 +++ b/mercurial/debugcommands.py Sat Apr 22 19:56:47 2017 +0900 @@ -2121,9 +2121,9 @@ ui.note(("* expanded:\n"), templater.prettyformat(newtree), '\n') if revs is None: - k = 'debugtemplate' - t = formatter.maketemplater(ui, k, tmpl) - ui.write(templater.stringify(t(k, ui=ui, **props))) + t = formatter.maketemplater(ui, tmpl) + props['ui'] = ui + ui.write(t.render(props)) else: displayer = cmdutil.makelogtemplater(ui, repo, tmpl) for r in revs: