# HG changeset patch # User Matt Mackall # Date 1270499108 18000 # Node ID 676de4ffd778e2bccbdfe4f3e0bffffaf906e93c # Parent 0cb61a4f5c5012ceb06e7831639a0377b86f8369 keywords: build a new templater to work around caching interaction diff -r 0cb61a4f5c50 -r 676de4ffd778 hgkw/keyword.py --- a/hgkw/keyword.py Wed Mar 24 01:43:24 2010 +0100 +++ b/hgkw/keyword.py Mon Apr 05 15:25:08 2010 -0500 @@ -135,13 +135,13 @@ self.re_kw = re.compile(kwpat) templatefilters.filters['utcdate'] = utcdate - self.ct = cmdutil.changeset_templater(self.ui, self.repo, - False, None, '', False) def substitute(self, data, path, ctx, subfunc): '''Replaces keywords in data with expanded template.''' def kwsub(mobj): kw = mobj.group(1) + self.ct = cmdutil.changeset_templater(self.ui, self.repo, + False, None, '', False) self.ct.use_template(self.templates[kw]) self.ui.pushbuffer() self.ct.show(ctx, root=self.repo.root, file=path)