hgkw/hgkwencode.py
changeset 1 1d997ec7be86
child 2 0bda12ebde94
equal deleted inserted replaced
0:41c7e55cd9e9 1:1d997ec7be86
       
     1 # $Hg: hgkwencode.py,v$
       
     2 
       
     3 import re, sys
       
     4 
       
     5 #re_kwencode = re.compile(r'[$]Hg.*?[$]')
       
     6 re_kwencode = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? [$]')
       
     7 
       
     8 def hgkwencode():
       
     9     sys.stdout.write(
       
    10             re_kwencode.sub(r'\1$', sys.stdin.read())
       
    11             )