--- a/mercurial/cmdutil.py Sat Apr 22 19:29:41 2017 +0900
+++ b/mercurial/cmdutil.py Tue Apr 11 21:38:24 2017 +0900
@@ -1593,7 +1593,9 @@
(self.ui.debugflag, 'debug'),
]
- self._parts = {'header': '', 'footer': '', 'changeset': 'changeset',
+ self._tref = tmplspec.ref
+ self._parts = {'header': '', 'footer': '',
+ tmplspec.ref: tmplspec.ref,
'docheader': '', 'docfooter': ''}
for mode, postfix in tmplmodes:
for t in self._parts:
@@ -1637,7 +1639,7 @@
self.ui.write(h)
# write changeset metadata, then patch if requested
- key = self._parts['changeset']
+ key = self._parts[self._tref]
self.ui.write(templater.stringify(self.t(key, **props)))
self.showpatch(ctx, matchfn)