templater: remove pseudo-ternary
authorMatt Mackall <mpm@selenic.com>
Tue, 25 Aug 2015 12:59:08 -0500
changeset 26085 1de0b66b65c5
parent 26084 b029d029354a
child 26086 3670efdc7088
templater: remove pseudo-ternary
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