##// END OF EJS Templates
Fix test-push-validation under Windows
Patrick Mezard -
r10469:b26c4a89 stable
parent child Browse files
Show More
@@ -1,14 +1,15 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 #
2 #
3 # This used to be a simple sed call like:
3 # This used to be a simple sed call like:
4 #
4 #
5 # $ sed "s:$HGTMP:*HGTMP*:"
5 # $ sed "s:$HGTMP:*HGTMP*:"
6 #
6 #
7 # But $HGTMP has ':' under Windows which breaks the sed call.
7 # But $HGTMP has ':' under Windows which breaks the sed call.
8 #
8 #
9 import sys, os
9 import sys, os
10
10
11 input = sys.stdin.read()
11 input = sys.stdin.read()
12 input = input.replace(os.environ['HGTMP'], '$HGTMP')
13 input = input.replace(os.sep, '/')
12 input = input.replace(os.sep, '/')
13 hgtmp = os.environ['HGTMP'].replace(os.sep, '/')
14 input = input.replace(hgtmp, '$HGTMP')
14 sys.stdout.write(input)
15 sys.stdout.write(input)
@@ -1,24 +1,22 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 STRIP=`pwd`
4
5 hg init test
3 hg init test
6 cd test
4 cd test
7 cat > .hg/hgrc <<EOF
5 cat > .hg/hgrc <<EOF
8 [server]
6 [server]
9 validate=1
7 validate=1
10 EOF
8 EOF
11 echo alpha > alpha
9 echo alpha > alpha
12 echo beta > beta
10 echo beta > beta
13 hg addr
11 hg addr
14 hg ci -m 1
12 hg ci -m 1
15
13
16 cd ..
14 cd ..
17 hg clone test test-clone
15 hg clone test test-clone
18
16
19 cd test-clone
17 cd test-clone
20 cp .hg/store/data/beta.i tmp
18 cp .hg/store/data/beta.i tmp
21 echo blah >> beta
19 echo blah >> beta
22 hg ci -m '2 (corrupt)'
20 hg ci -m '2 (corrupt)'
23 mv tmp .hg/store/data/beta.i
21 mv tmp .hg/store/data/beta.i
24 hg push 2>&1 | sed "s%$STRIP%test-root%"
22 hg push 2>&1 | "$TESTDIR/filtertmp.py"
@@ -1,12 +1,12 b''
1 adding alpha
1 adding alpha
2 adding beta
2 adding beta
3 updating to branch default
3 updating to branch default
4 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5 pushing to test-root/test
5 pushing to $HGTMP/test-push-validation/test
6 searching for changes
6 searching for changes
7 adding changesets
7 adding changesets
8 adding manifests
8 adding manifests
9 adding file changes
9 adding file changes
10 transaction abort!
10 transaction abort!
11 rollback completed
11 rollback completed
12 abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
12 abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
General Comments 0
You need to be logged in to leave comments. Login now