hgkw/keyword.py
branchsolo-extension
changeset 66 8a8d30596640
parent 65 188849659487
child 67 7311b30cdb58
equal deleted inserted replaced
65:188849659487 66:8a8d30596640
   116                                     fileid=node, filelog=self),
   116                                     fileid=node, filelog=self),
   117                                 data)
   117                                 data)
   118             return data
   118             return data
   119 
   119 
   120         def add(self, text, meta, tr, link, p1=None, p2=None):
   120         def add(self, text, meta, tr, link, p1=None, p2=None):
   121             if not util.binary(text):
   121             if not self._path.startswith('.hg') and not util.binary(text):
   122                 ui.debug(_('removing keyword substitutions in %s\n')
   122                 for mf in kwfmatchers(ui, self._repo):
   123                         % self._path)
   123                     if mf(self._path):
   124                 text = re_kw.sub(r'$\1$', text)
   124                         ui.debug(_('removing keyword substitutions in %s\n')
       
   125                                 % self._path)
       
   126                         text = re_kw.sub(r'$\1$', text)
       
   127                         break
   125             return super(kwfilelog, self).add(text, meta, tr, link, p1, p2)
   128             return super(kwfilelog, self).add(text, meta, tr, link, p1, p2)
   126 
   129 
   127         def size(self, rev):
   130         def size(self, rev):
   128             '''Overrides filelog's size() to use kwfilelog.read().'''
   131             '''Overrides filelog's size() to use kwfilelog.read().'''
   129             node = revlog.node(self, rev)
   132             node = revlog.node(self, rev)