# HG changeset patch # User Christian Ebert # Date 1167916695 -3600 # Node ID 8a8d305966400607c9310ae5e433d1bbb8998913 # Parent 18884965948730c6c7b252b6b171fb60911d4521 Make kwfilelog.add respect filename config diff -r 188849659487 -r 8a8d30596640 hgkw/keyword.py --- a/hgkw/keyword.py Thu Jan 04 13:13:54 2007 +0100 +++ b/hgkw/keyword.py Thu Jan 04 14:18:15 2007 +0100 @@ -118,10 +118,13 @@ return data def add(self, text, meta, tr, link, p1=None, p2=None): - if not util.binary(text): - ui.debug(_('removing keyword substitutions in %s\n') - % self._path) - text = re_kw.sub(r'$\1$', text) + if not self._path.startswith('.hg') and not util.binary(text): + for mf in kwfmatchers(ui, self._repo): + if mf(self._path): + ui.debug(_('removing keyword substitutions in %s\n') + % self._path) + text = re_kw.sub(r'$\1$', text) + break return super(kwfilelog, self).add(text, meta, tr, link, p1, p2) def size(self, rev):