# HG changeset patch # User Christian Ebert # Date 1166622878 -3600 # Node ID e1c539e1282b4764245f795715d35cddd02539d4 # Parent 38ee735886d2f4ae436d3fab1a640e2b89164f08 Make patterns stricter again, to avoid unvolontary expansions diff -r 38ee735886d2 -r e1c539e1282b hgkw/keyword.py --- 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 diff -r 38ee735886d2 -r e1c539e1282b hgkw/pretxnkw.py --- 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()