Mercurial > hg-stable
changeset 26085:1de0b66b65c5
templater: remove pseudo-ternary
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 25 Aug 2015 12:59:08 -0500 |
parents | b029d029354a |
children | 3670efdc7088 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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