Follow upstream changes -- rest
[git-darcs-import.git] / tests / issue1043_geteff_a.sh
blob2ad782a2fbf7f8e0f3b5f9b2a91e68f44aa84893
1 #!/usr/bin/env bash
3 set -ev
4 rm -rf temp1 temp2
6 # creating the fork point
7 mkdir temp1
8 cd temp1
9 darcs init
10 cat > foo << FOO
11 original - apple
12 original - banana
13 FOO
14 darcs add foo
15 darcs record -am init
16 cd ..
17 darcs get temp1 temp2
19 # do some work in the mainline
20 cd temp1
21 cat > foo << FOO
22 conflict 1 - artichoke
23 original - banana
24 FOO
25 darcs record -am 'conflict 1a'
26 cat > foo << FOO
27 conflict 1 - artichoke
28 conflict 1 - brocolli
29 FOO
30 darcs record -am 'conflict 1b'
31 cd ..
33 # do some work in the branch
34 cd temp2
35 cat > foo << FOO
36 conflict 2 - aardvark
37 original - banana
38 conflict 2 - cougar
39 FOO
40 darcs record -am 'conflict 2'
41 cd ..
43 # in the branch, pull from the mainline and resolve the conflict
44 cd temp2
45 darcs pull -a ../temp1 --allow-conflicts
46 cat > foo << FOO
47 resolution
48 original - apple
49 original - banana
50 FOO
51 darcs record -am 'resolve conflicts 2,1a,1b'
52 cd ..
54 # do some extra work in the mainline
55 cd temp1
56 cat > foo << FOO
57 original - apple
58 FOO
59 darcs record -am 'conflict 1c'
60 cd ..
62 # in the branch, pull from the mainline again
63 cd temp2
64 darcs pull -a ../temp1 --allow-conflicts
65 cd ..
67 rm -rf temp1 temp2