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