Follow upstream changes -- rest
[git-darcs-import.git] / tests / mark-conflicts.sh
blobc6cc43c783d38257302d105356690cf934924829
1 #!/usr/bin/env bash
3 # Automated tests for "darcs mark-conflicts".
5 # The builtin ! has the wrong semantics for not.
6 not () { "$@" && exit 1 || :; }
8 mkdir temp1
9 cd temp1
10 darcs init
11 echo "Conflict, Base ." > child_of_conflict
12 darcs add child_of_conflict
13 darcs record -am 'Conflict Base'
14 cd ..
15 darcs get temp1 temp2
17 # Add and record differing lines to both repos
18 cd temp1
19 echo "Conflict, Part 1." > child_of_conflict
20 darcs record -A author -am 'Conflict Part 1'
21 cd ..
22 cd temp2
23 echo "Conflict, Part 2." > child_of_conflict
24 darcs record -A author -am 'Conflict Part 2'
25 cd ..
27 cd temp1
28 darcs pull -a ../temp2 > log
29 grep conflict log
30 grep finished log
31 grep 'v v' child_of_conflict
32 darcs revert -a
33 not grep 'v v' child_of_conflict
34 darcs mark-conflicts
35 grep 'v v' child_of_conflict
36 cd ..
38 rm -rf temp1 temp2