hgkw/hgkwencode.py
changeset 1 1d997ec7be86
child 2 0bda12ebde94
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hgkw/hgkwencode.py	Tue Dec 12 22:26:05 2006 +0100
@@ -0,0 +1,11 @@
+# $Hg: hgkwencode.py,v$
+
+import re, sys
+
+#re_kwencode = re.compile(r'[$]Hg.*?[$]')
+re_kwencode = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? [$]')
+
+def hgkwencode():
+    sys.stdout.write(
+            re_kwencode.sub(r'\1$', sys.stdin.read())
+            )