hgkw/keyword.py
branchkwmap-templates
changeset 171 8713a7a3f5ab
parent 170 1a17c8f20f22
child 172 ad0da655bd12
equal deleted inserted replaced
170:1a17c8f20f22 171:8713a7a3f5ab
   192         self.kwtemplater = kwtemplater
   192         self.kwtemplater = kwtemplater
   193 
   193 
   194     def read(self, node):
   194     def read(self, node):
   195         '''Substitutes keywords when reading filelog.'''
   195         '''Substitutes keywords when reading filelog.'''
   196         data = super(kwfilelog, self).read(node)
   196         data = super(kwfilelog, self).read(node)
   197         return self.kwtemplater.expand(node, self, data)
   197         return self.kwtemplater.expand(node, super(kwfilelog, self), data)
   198 
   198 
   199     def add(self, text, meta, tr, link, p1=None, p2=None):
   199     def add(self, text, meta, tr, link, p1=None, p2=None):
   200         '''Removes keyword substitutions when adding to filelog.'''
   200         '''Removes keyword substitutions when adding to filelog.'''
   201         text = self.kwtemplater.shrink(text)
   201         text = self.kwtemplater.shrink(text)
   202         return super(kwfilelog, self).add(text, meta, tr, link, p1=p1, p2=p2)
   202         return super(kwfilelog, self).add(text, meta, tr, link, p1=p1, p2=p2)