hgkw/keyword.py
branchstable
changeset 504 2e610bc63d9e
parent 502 6fccffd4059a
child 505 a93358a05b80
equal deleted inserted replaced
502:6fccffd4059a 504:2e610bc63d9e
   151         '''Replaces keywords in data with expanded template.'''
   151         '''Replaces keywords in data with expanded template.'''
   152         def kwsub(mobj):
   152         def kwsub(mobj):
   153             kw = mobj.group(1)
   153             kw = mobj.group(1)
   154             self.ct.use_template(self.templates[kw])
   154             self.ct.use_template(self.templates[kw])
   155             self.ui.pushbuffer()
   155             self.ui.pushbuffer()
   156             self.ct.show(changenode=node, root=self.repo.root, file=path)
   156             self.ct.show(self.repo[node], root=self.repo.root, file=path)
   157             ekw = templatefilters.firstline(self.ui.popbuffer())
   157             ekw = templatefilters.firstline(self.ui.popbuffer())
   158             return '$%s: %s $' % (kw, ekw)
   158             return '$%s: %s $' % (kw, ekw)
   159         return subfunc(kwsub, data)
   159         return subfunc(kwsub, data)
   160 
   160 
   161     def expand(self, path, node, data):
   161     def expand(self, path, node, data):