Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / hidden_conflict2.sh
bloba3daecf0b2de791193c7ae6a1001af5d5d84baeb
1 #!/usr/bin/env bash
2 set -ev
4 # A test for a missed resolution, inspired by bug #10 in RT
6 rm -rf temp1 temp2
7 mkdir temp1
8 cd temp1
9 darcs init
10 cd ..
11 mkdir temp2
12 cd temp2
13 darcs init
14 cd ..
16 # set up temp1
17 cd temp1
18 cat > A << FOO
24 FOO
25 darcs add A
26 darcs record -m 'add' --all
27 cd ..
29 # set up temp2
30 cd temp2
31 darcs pull --all ../temp1
32 cat > A << FOO
42 FOO
43 darcs record -m 'change2' --all
44 cd ..
46 # generate a conflict
47 cd temp1
48 cat > A << FOO
57 FOO
58 darcs record -m 'change1' --all
59 darcs pull --all ../temp2
60 # we should have a marked conflict now.
61 grep 'v v' A
62 # we resolve it simply by removing conflict markers.
63 sed -e '/\^ \^|\*\*|v v/d' A > temp
64 mv temp A
65 darcs record -m resolution --all
66 # now mark-conflicts shouldn't find any unmarked conflicts
67 darcs mark-conflicts | grep "No conflicts to mark"
68 cd ..
70 rm -rf temp1 temp2