hgkw/keyword.py
branchextension
changeset 41 e1c539e1282b
parent 36 b3ace8cc5a33
child 42 ba000e29ecf3
--- a/hgkw/keyword.py	Wed Dec 20 10:37:06 2006 +0100
+++ b/hgkw/keyword.py	Wed Dec 20 14:54:38 2006 +0100
@@ -45,7 +45,8 @@
         def add(self, text, meta, tr, link, p1=None, p2=None):
             if (not util.binary(text) and
                    self._repo.ui.config('keyword', 'remove', True)):
-                text = re.sub(r'\$Hg[^$]*?\$', '$Hg$', text)
+                re_kw = re.compile(r'\$Hg: [^$]+?,v [a-z0-9]{12} [^$]+? \$')
+                text = re_kw.sub('$Hg$', text)
             return super(kwfilelog, self).add(text, meta, tr, link, p1, p2)
 
     filelog.filelog = kwfilelog