##// END OF EJS Templates
test-merge1: avoid a shell script
Alexis S. L. Carvalho -
r4294:ccfe423d default
parent child Browse files
Show More
@@ -1,10 +1,10 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 cat <<'EOF' > merge
3 cat <<EOF > merge
4 #!/bin/sh
4 import sys, os
5 echo merging for `basename $1`
5 print "merging for", os.path.basename(sys.argv[1])
6 EOF
6 EOF
7 chmod +x merge
7 HGMERGE="python ../merge"; export HGMERGE
8
8
9 mkdir t
9 mkdir t
10 cd t
10 cd t
@@ -22,7 +22,7 b' hg add c'
22 hg commit -m "commit #2" -d "1000000 0"
22 hg commit -m "commit #2" -d "1000000 0"
23 echo This is file b1 > b
23 echo This is file b1 > b
24 echo %% no merges expected
24 echo %% no merges expected
25 env HGMERGE=../merge hg merge 1
25 hg merge 1
26 hg diff --nodates
26 hg diff --nodates
27 hg status
27 hg status
28 cd ..; rm -r t
28 cd ..; rm -r t
@@ -43,9 +43,9 b' hg add c'
43 hg commit -m "commit #2" -d "1000000 0"
43 hg commit -m "commit #2" -d "1000000 0"
44 echo This is file b2 > b
44 echo This is file b2 > b
45 echo %% merge should fail
45 echo %% merge should fail
46 env HGMERGE=../merge hg merge 1
46 hg merge 1
47 echo %% merge of b expected
47 echo %% merge of b expected
48 env HGMERGE=../merge hg merge -f 1
48 hg merge -f 1
49 hg diff --nodates
49 hg diff --nodates
50 hg status
50 hg status
51 cd ..; rm -r t
51 cd ..; rm -r t
@@ -72,9 +72,9 b' cat b'
72
72
73 echo This is file b22 > b
73 echo This is file b22 > b
74 echo %% merge fails
74 echo %% merge fails
75 env HGMERGE=../merge hg merge 2
75 hg merge 2
76 echo %% merge expected!
76 echo %% merge expected!
77 env HGMERGE=../merge hg merge -f 2
77 hg merge -f 2
78 hg diff --nodates
78 hg diff --nodates
79 hg status
79 hg status
80 cd ..; rm -r t
80 cd ..; rm -r t
@@ -96,8 +96,8 b' hg add c'
96 hg commit -m "commit #3" -d "1000000 0"
96 hg commit -m "commit #3" -d "1000000 0"
97 echo This is file b33 > b
97 echo This is file b33 > b
98 echo %% merge of b should fail
98 echo %% merge of b should fail
99 env HGMERGE=../merge hg merge 2
99 hg merge 2
100 echo %% merge of b expected
100 echo %% merge of b expected
101 env HGMERGE=../merge hg merge -f 2
101 hg merge -f 2
102 hg diff --nodates
102 hg diff --nodates
103 hg status
103 hg status
General Comments 0
You need to be logged in to leave comments. Login now