updatehook branch: add kwexpander and updatekw modules
WARNING: Do not use this branch for production!
Update hook changes to working directory are detected by hg.
The only /hook/ to escape hg's attention seems to be pretxcommit.
And that probably only due to bug.
Kept branch for archiving purposes.
# $Hg: hgkwencode.py,v$
import re, sys
def kwencode():
'''Truncates keywords in IO stream.'''
re_kwtrunc = re.compile(r'([$]Hg: .+?,v) [a-z0-9]{12} [^$]+? \$')
sys.stdout.write(re_kwtrunc.sub(r'\1$', sys.stdin.read()))