hgkw/keyword.py
branchstable
changeset 373 56573f49772c
parent 372 d5588b31bcad
child 374 03fc5e667518
equal deleted inserted replaced
372:d5588b31bcad 373:56573f49772c
   149             '''Substitutes keyword using corresponding template.'''
   149             '''Substitutes keyword using corresponding template.'''
   150             kw = mobj.group(1)
   150             kw = mobj.group(1)
   151             self.ct.use_template(self.templates[kw])
   151             self.ct.use_template(self.templates[kw])
   152             self.ui.pushbuffer()
   152             self.ui.pushbuffer()
   153             self.ct.show(changenode=fnode, root=self.repo.root, file=self.path)
   153             self.ct.show(changenode=fnode, root=self.repo.root, file=self.path)
   154             return '$%s: %s $' % (kw, templatefilters.firstline(
   154             ekw = templatefilters.firstline(self.ui.popbuffer())
   155                 self.ui.popbuffer()))
   155             return '$%s: %s $' % (kw, ekw)
   156 
   156 
   157         return subfunc(kwsub, data)
   157         return subfunc(kwsub, data)
   158 
   158 
   159     def expand(self, node, data):
   159     def expand(self, node, data):
   160         '''Returns data with keywords expanded.'''
   160         '''Returns data with keywords expanded.'''