branch | stable |
changeset 12795 | 3cb0559e44d0 |
parent 12793 | 469850088fc1 |
parent 12794 | 6bf8d48bec8e |
child 12796 | bc69ba99e34b |
12793:469850088fc1 | 12795:3cb0559e44d0 |
---|---|
1 #!/usr/bin/env python |
|
2 # |
|
3 # This used to be a simple sed call like: |
|
4 # |
|
5 # $ sed "s:$HGTMP:*HGTMP*:" |
|
6 # |
|
7 # But $HGTMP has ':' under Windows which breaks the sed call. |
|
8 # |
|
9 import sys, os |
|
10 |
|
11 input = sys.stdin.read() |
|
12 input = input.replace(os.sep, '/') |
|
13 hgtmp = os.environ['HGTMP'].replace(os.sep, '/') |
|
14 input = input.replace(hgtmp, '$HGTMP') |
|
15 sys.stdout.write(input) |