[PATCH 3 of 5] templater: remove pseudo-ternary
Matt Mackall
mpm at selenic.com
Tue Aug 25 14:56:39 CDT 2015
# HG changeset patch
# User Matt Mackall <mpm at selenic.com>
# Date 1440525548 18000
# Tue Aug 25 12:59:08 2015 -0500
# Node ID 976f1ba20c1c0cf289ffddde694442dbadee7896
# Parent acf5f71584b3d6321ba96785865c8f75f4fe6164
templater: remove pseudo-ternary
diff -r acf5f71584b3 -r 976f1ba20c1c 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
More information about the Mercurial-devel
mailing list