Mercurial > public > mercurial-scm > hg-stable
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/filtertmp.py Sun Feb 14 18:19:18 2010 +0100 @@ -0,0 +1,14 @@ +#!/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)