view tests/filtertmp.py @ 10468:2250fc372d34 stable

Fix test-share and test-subrepo under Windows
author Patrick Mezard <pmezard@gmail.com>
date Sun, 14 Feb 2010 18:19:18 +0100
parents
children b26c4a89a143
line wrap: on
line source

#!/usr/bin/env python
#
# This used to be a simple sed call like:
#
#  $ sed "s:$HGTMP:*HGTMP*:"
#
# But $HGTMP has ':' under Windows which breaks the sed call.
#
import sys, os

input = sys.stdin.read()
input = input.replace(os.environ['HGTMP'], '$HGTMP')
input = input.replace(os.sep, '/')
sys.stdout.write(input)