Make the templater a local variable
authorChristian Ebert <blacktrash@gmx.net>
Mon, 12 Apr 2010 17:34:12 +0200
changeset 714 1acf49264a06
parent 713 287137014488
child 715 0614ba0295f6
Make the templater a local variable
hgkw/keyword.py
--- a/hgkw/keyword.py	Tue Apr 13 10:05:51 2010 +0200
+++ b/hgkw/keyword.py	Mon Apr 12 17:34:12 2010 +0200
@@ -140,11 +140,11 @@
         '''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])
+            ct = cmdutil.changeset_templater(self.ui, self.repo,
+                                             False, None, '', False)
+            ct.use_template(self.templates[kw])
             self.ui.pushbuffer()
-            self.ct.show(ctx, root=self.repo.root, file=path)
+            ct.show(ctx, root=self.repo.root, file=path)
             ekw = templatefilters.firstline(self.ui.popbuffer())
             return '$%s: %s $' % (kw, ekw)
         return subfunc(kwsub, data)