comparison mercurial/cmdutil.py @ 26084:b029d029354a

templater: fix variable name that shadows built-in
author Matt Mackall <mpm@selenic.com>
date Tue, 25 Aug 2015 12:57:21 -0500
parents 027763aed157
children 1de0b66b65c5
comparison
equal deleted inserted replaced
26083:027763aed157 26084:b029d029354a
1448 (self.ui.debugflag, 'debug'), 1448 (self.ui.debugflag, 'debug'),
1449 ] 1449 ]
1450 1450
1451 types = {'header': '', 'footer': '', 'changeset': 'changeset'} 1451 types = {'header': '', 'footer': '', 'changeset': 'changeset'}
1452 for mode, postfix in tmplmodes: 1452 for mode, postfix in tmplmodes:
1453 for type in types: 1453 for t in types:
1454 cur = postfix and ('%s_%s' % (type, postfix)) or type 1454 cur = postfix and ('%s_%s' % (t, postfix)) or t
1455 if mode and cur in self.t: 1455 if mode and cur in self.t:
1456 types[type] = cur 1456 types[t] = cur
1457 1457
1458 try: 1458 try:
1459 # write header 1459 # write header
1460 if types['header']: 1460 if types['header']:
1461 h = templater.stringify(self.t(types['header'], **props)) 1461 h = templater.stringify(self.t(types['header'], **props))