Follow upstream changes -- rest
[git-darcs-import.git] / tests / mergeresolved.sh
blob68f9b637e692455bbcd540004669934925924b97
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf fooOld tempA tempB
5 mkdir fooOld tempA tempB
6 cd fooOld
7 darcs init
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 Old > foo
13 darcs add foo
14 darcs record -m Old
15 cd ..
17 cd tempA
18 darcs init
19 cp ../fooOld/_darcs/prefs/defaults _darcs/prefs
20 darcs pull ../fooOld
21 echo A > foo
22 darcs record -m AA
23 cd ..
25 cd tempB
26 darcs init
27 cp ../fooOld/_darcs/prefs/defaults _darcs/prefs
28 darcs pull ../fooOld
29 echo B > foo
30 darcs record -m BB
31 darcs pull ../tempA
32 echo A > foo
33 darcs record -m "ok A's fine."
34 cd ..
36 # At this point, tempB and tempA should agree--since the conflict was
37 # resolved in favor of tempA.
38 cmp tempB/foo tempA/foo
40 cd tempA
41 echo AA > foo
42 darcs record -m "AA -- upping the ante."
43 cd ..
45 cd tempB
46 darcs pull ../tempA
47 cd ..
49 cd tempA
50 darcs pull ../tempB
51 cd ..
53 # At this point, tempB and tempA should agree since we have pulled both ways.
54 cmp tempB/foo tempA/foo
56 rm -rf fooOld tempA tempB