##// END OF EJS Templates
keyword: make the templater a local variable...
Christian Ebert -
r10894:26cf11f9 default
parent child Browse files
Show More
@@ -140,11 +140,11 b' class kwtemplater(object):'
140 '''Replaces keywords in data with expanded template.'''
140 '''Replaces keywords in data with expanded template.'''
141 def kwsub(mobj):
141 def kwsub(mobj):
142 kw = mobj.group(1)
142 kw = mobj.group(1)
143 self.ct = cmdutil.changeset_templater(self.ui, self.repo,
143 ct = cmdutil.changeset_templater(self.ui, self.repo,
144 False, None, '', False)
144 False, None, '', False)
145 self.ct.use_template(self.templates[kw])
145 ct.use_template(self.templates[kw])
146 self.ui.pushbuffer()
146 self.ui.pushbuffer()
147 self.ct.show(ctx, root=self.repo.root, file=path)
147 ct.show(ctx, root=self.repo.root, file=path)
148 ekw = templatefilters.firstline(self.ui.popbuffer())
148 ekw = templatefilters.firstline(self.ui.popbuffer())
149 return '$%s: %s $' % (kw, ekw)
149 return '$%s: %s $' % (kw, ekw)
150 return subfunc(kwsub, data)
150 return subfunc(kwsub, data)
General Comments 0
You need to be logged in to leave comments. Login now