equal
deleted
inserted
replaced
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 |
11 hg init |
11 hg init |
12 echo This is file a1 > a |
12 echo This is file a1 > a |
20 echo This is file c1 > c |
20 echo This is file c1 > c |
21 hg add c |
21 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 |
29 |
29 |
30 mkdir t |
30 mkdir t |
41 echo This is file c1 > c |
41 echo This is file c1 > c |
42 hg add c |
42 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 |
52 echo %% |
52 echo %% |
53 |
53 |
70 echo 'Contents of b should be "this is file b1"' |
70 echo 'Contents of b should be "this is file b1"' |
71 cat b |
71 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 |
81 |
81 |
82 mkdir t |
82 mkdir t |
94 echo This is file c1 > c |
94 echo This is file c1 > c |
95 hg add c |
95 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 |