diff -r b029d029354a -r 1de0b66b65c5 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Tue Aug 25 12:57:21 2015 -0500 +++ b/mercurial/cmdutil.py Tue Aug 25 12:59:08 2015 -0500 @@ -1451,7 +1451,9 @@ types = {'header': '', 'footer': '', 'changeset': 'changeset'} for mode, postfix in tmplmodes: for t in types: - cur = postfix and ('%s_%s' % (t, postfix)) or t + cur = t + if postfix: + cur += "_" + postfix if mode and cur in self.t: types[t] = cur