##// END OF EJS Templates
Add some tests to the repo
mpm@selenic.com -
r28:9f64ee81 default
parent child Browse files
Show More
@@ -0,0 +1,86 b''
1 set -e
2 set -x
3
4 # skip commit logs
5 export HGMERGE=tkmerge
6 export EDITOR=true
7
8 rm -rf m m1 m2
9 mkdir m
10 cd m
11
12 echo "m this that"
13 echo "this" > a
14 echo "that" > b
15 hg init
16 hg addremove
17 hg commit
18 echo "a:" `hg dump a` "b:" `hg dump b`
19 echo
20
21 cd ..
22 echo "m2 this that "
23 mkdir m2
24 cd m2
25 hg branch ../m
26 hg checkout
27 echo "a:" `hg dump a` "b:" `hg dump b`
28 echo
29
30 cd ../m
31 echo "m this1 that "
32 echo "this1" > a
33 hg commit
34 echo "a:" `hg dump a` "b:" `hg dump b`
35 echo
36
37 cd ..
38 echo "m1 this1 that "
39 mkdir m1
40 cd m1
41 hg branch ../m
42 hg checkout
43 echo "a:" `hg dump a` "b:" `hg dump b`
44 echo
45
46 cd ../m1
47 echo "m1 this1 that1"
48 echo "that1" > b
49 hg commit
50 echo "a:" `hg dump a` "b:" `hg dump b`
51 echo
52
53 cd ../m2
54 echo "m2 this that2"
55 echo "that2" > b
56 hg commit
57 echo "a:" `hg dump a` "b:" `hg dump b`
58 echo
59
60 cd ../m1
61 echo "m1:m2 this1 that1 that2"
62 hg merge ../m2 # b should conflict, a should be fine
63 echo "a:" `hg dump a` "b:" `hg dump b`
64 echo
65
66 cd ../m2
67 echo "m2 this2 that2"
68 echo "this2" > a
69 hg commit
70 echo "a:" `hg dump a` "b:" `hg dump b`
71 echo
72
73 cd ../m2
74 echo "m2:m this12 that2"
75 hg merge ../m # a should conflict, b should be fine
76 echo "a:" `hg dump a` "b:" `hg dump b`
77 echo
78
79 # now here's the interesting bit
80 # if we choose ancestor by file, no conflicts
81 # otherwise we've got two equally close ancestors, each with a conflict
82 # if we go back to the root, we'll have both conflicts again
83 echo "m2:m1 this12 that12"
84 hg merge ../m1 # should be clean
85 echo "a:" `hg dump a` "b:" `hg dump b`
86 echo
@@ -0,0 +1,42 b''
1 #!/bin/sh -x
2
3 set +e
4
5 BASE=foo.base
6 BR1=foo.br1
7 BR2=foo.br2
8 BR2_1=foo.br2_1
9
10 mkdir $BASE
11 cd $BASE
12 hg init
13 echo test > file
14 hg add file
15 EDITOR="echo 'initial commit' > " hg commit
16 cd ..
17
18 mkdir $BR1
19 cd $BR1
20 hg branch ../$BASE
21 hg checkout
22 echo test > file1
23 hg addremove
24 EDITOR="echo side commit >" hg commit
25 cd ..
26
27 mkdir $BR2
28 cd $BR2
29 hg branch ../$BASE
30 hg checkout
31 echo yet more >> file2
32 hg addremove
33 EDITOR="echo second update >" hg commit
34 cd ..
35
36 mkdir $BR2_1
37 cd $BR2_1
38 hg branch ../$BR2
39 hg checkout
40 EDITOR="echo commit merge >" hg merge ../$BR1
41
42 hg checkout
@@ -0,0 +1,22 b''
1 set -ex
2 export EDITOR=true
3 rm -rf test branch
4
5 mkdir test
6 cd test
7 echo foo>foo
8 hg init
9 hg addremove
10 hg commit
11 hg verify
12 cd ..
13
14 cp -a test branch
15 cd branch
16 echo bar>>foo
17 hg commit
18
19 cd ../test
20 hg merge ../branch
21 hg verify
22
General Comments 0
You need to be logged in to leave comments. Login now