equal
deleted
inserted
replaced
4 demandload(globals(), 'hgkw:kwutil mercurial:localrepo re sys') |
4 demandload(globals(), 'hgkw:kwutil mercurial:localrepo re sys') |
5 |
5 |
6 def kwdecode(): |
6 def kwdecode(): |
7 '''Expands keywords into IO stream.''' |
7 '''Expands keywords into IO stream.''' |
8 |
8 |
9 lr = localrepo.localrepository(None) |
9 repo = localrepo.localrepository(None) |
10 |
10 |
11 kword = kwutil.mkkw(lr, tip=False, node='') |
11 kword = kwutil.mkkw(repo, tip=False, node='') |
12 re_kw = kwutil.rekw() |
12 re_kw = kwutil.rekw() |
13 |
13 |
14 sys.stdout.write(re_kw.sub(kword, sys.stdin.read())) |
14 sys.stdout.write(re_kw.sub(kword, sys.stdin.read())) |