hgkw/hgkwencode.py
changeset 193 7a775a8f6fb9
parent 3 b9f2c0853da3
parent 192 0d2a6c9f8343
child 194 2a51062ecc60
equal deleted inserted replaced
3:b9f2c0853da3 193:7a775a8f6fb9
     1 # $Hg: hgkwencode.py,v$
       
     2 
       
     3 import re, sys
       
     4 
       
     5 def kwencode():
       
     6     '''Truncates keywords in IO stream.'''
       
     7 
       
     8     re_kwtrunc = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? \$')
       
     9     sys.stdout.write(re_kwtrunc.sub(r'\1$', sys.stdin.read()))