--- 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
--- a/hgkw/pretxnkw.py Wed Dec 20 10:37:06 2006 +0100
+++ b/hgkw/pretxnkw.py Wed Dec 20 14:54:38 2006 +0100
@@ -43,7 +43,7 @@
date = util.datestr(date=date, format=util.defaultdateformats[0])
# %Y-%m-%d %H:%M:%S
- re_kw = re.compile(r'\$Hg[^$]*?\$')
+ re_kw = re.compile(r'\$Hg(: [^$]+?,v [a-z0-9]{12} [^$]+? )?\$')
for f in files:
data = repo.wfile(f).read()