Follow upstream changes -- rest
[git-darcs-import.git] / tests / merge_three_patches.sh
blob4f603abbd4a70776aee649d3012bcc5b3047ee95
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf tempOld tempA tempB
5 mkdir tempOld tempA
6 cd tempOld
7 darcs initialize
8 echo record author me > _darcs/prefs/defaults
9 echo ALL all >> _darcs/prefs/defaults
10 #echo ALL verbose >> _darcs/prefs/defaults
11 echo ALL ignore-times >> _darcs/prefs/defaults
12 echo A > foo
13 echo B >> foo
14 echo C >> foo
15 echo D >> foo
16 echo E >> foo
17 echo F >> foo
18 echo G >> foo
19 echo H >> foo
20 darcs add foo
21 darcs record -m Old
22 cd ..
24 cd tempA
25 darcs initialize
26 cp ../tempOld/_darcs/prefs/defaults _darcs/prefs
27 darcs pull ../tempOld
28 cp foo temp
29 cat temp | grep -v A | grep -v B | grep -v D | sed s/E/e/ \
30 | grep -v G | sed s/H/h/ > foo
31 darcs record -m AA
32 cd ..
34 darcs get tempOld tempB
35 cd tempB
36 cp ../tempOld/_darcs/prefs/defaults _darcs/prefs
37 echo 7 > foo
38 darcs record -m BB
39 darcs pull ../tempA
40 darcs record -m "conflict resolution"
41 cd ..
43 cd tempA
44 darcs pull ../tempB
45 darcs annotate -p B
46 darcs annotate -p resolution
47 cd ..
49 cmp tempA/foo tempB/foo
51 rm -rf tempOld tempA tempB