--- a/mercurial/templater.py Wed Dec 22 13:16:00 2010 -0600
+++ b/mercurial/templater.py Wed Dec 22 13:16:03 2010 -0600
@@ -282,7 +282,7 @@
self.filters.update(filters)
self.defaults = defaults
self.minchunk, self.maxchunk = minchunk, maxchunk
- self.engines = {}
+ self.ecache = {}
if not mapfile:
return
@@ -322,10 +322,10 @@
def __call__(self, t, **mapping):
ttype = t in self.map and self.map[t][0] or 'default'
- proc = self.engines.get(ttype)
- if proc is None:
- proc = engines[ttype](self.load, self.filters, self.defaults)
- self.engines[ttype] = proc
+ if ttype not in self.ecache:
+ self.ecache[ttype] = engines[ttype](self.load,
+ self.filters, self.defaults)
+ proc = self.ecache[ttype]
stream = proc.process(t, mapping)
if self.minchunk: