--- a/hgkw/hgkwencode.py Tue Dec 12 23:35:45 2006 +0100
+++ b/hgkw/hgkwencode.py Thu Dec 14 08:17:01 2006 +0100
@@ -2,9 +2,8 @@
import re, sys
-#re_kw = re.compile(r'[$]Hg.*?[$]')
-re_kw = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? [$]')
+def kwencode():
+ '''Truncates keywords in IO stream.'''
-def kwencode():
- sys.stdout.write(
- re_kw.sub(r'\1$', sys.stdin.read()))
+ re_kwtrunc = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? \$')
+ sys.stdout.write(re_kwtrunc.sub(r'\1$', sys.stdin.read()))