##// END OF EJS Templates
Fix test-share and test-subrepo under Windows
Patrick Mezard -
r10468:2250fc37 stable
parent child Browse files
Show More
@@ -0,0 +1,14 b''
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.environ['HGTMP'], '$HGTMP')
13 input = input.replace(os.sep, '/')
14 sys.stdout.write(input)
@@ -19,7 +19,7 b' cd repo2'
19 19 && echo "fail: .hg/store should not exist" \
20 20 || echo "pass: .hg/store does not exist"
21 21 # Some sed versions appends newline, some don't, and some just fails
22 (cat .hg/sharedpath; echo) | head -n1 | sed "s:$HGTMP:*HGTMP*:"
22 (cat .hg/sharedpath; echo) | head -n1 | "$TESTDIR/filtertmp.py"
23 23
24 24 echo % commit in shared clone
25 25 echo a >> a
@@ -5,7 +5,7 b' updating working directory'
5 5 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6 6 % contents of repo2/.hg
7 7 pass: .hg/store does not exist
8 *HGTMP*/test-share/repo1/.hg
8 $HGTMP/test-share/repo1/.hg
9 9 % commit in shared clone
10 10 % check original
11 11 changeset: 1:8af4dc49db9e
@@ -180,7 +180,9 b' hg -R main add'
180 180 hg -R main ci -m "add subrepos"
181 181 cd ..
182 182 hg clone mercurial/main mercurial2/main
183 cat mercurial2/main/nested_absolute/.hg/hgrc mercurial2/main/nested_relative/.hg/hgrc | sed "s:${PWD}:/tmp:"
183 cat mercurial2/main/nested_absolute/.hg/hgrc \
184 mercurial2/main/nested_relative/.hg/hgrc \
185 | "$TESTDIR/filtertmp.py"
184 186 rm -rf mercurial mercurial2
185 187
186 188 exit 0
@@ -256,6 +256,6 b' committing subrepository nested_absolute'
256 256 updating to branch default
257 257 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 258 [paths]
259 default = /tmp/mercurial/main/nested_absolute
259 default = $HGTMP/test-subrepo/sub/mercurial/main/nested_absolute
260 260 [paths]
261 default = /tmp/mercurial/main/nested_relative
261 default = $HGTMP/test-subrepo/sub/mercurial/main/nested_relative
General Comments 0
You need to be logged in to leave comments. Login now