chiark / gitweb /
4517be4aa71575f94c692aa5ffa475b8ccc40a0d
[dgit.git] / tests / tests / gdr-merge-conflicts
1 #!/bin/bash
2 set -e
3 autoimport=
4 . tests/lib
5
6 t-dependencies NO-DGIT GDR
7
8 t-tstunt-parsechangelog
9 t-setup-import gdr-convert-gbp-noarchive
10
11 export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
12
13 : ----- prepare the baseline -----
14
15 cd $p
16
17 t-gdr-prep-new-upstream 2.1
18 git tag v2.1 upstream
19
20 t-some-changes before
21 t-git-debrebase quick
22
23 : ===== early failure in walk =====
24
25 : ----- prepare other -----
26
27 git checkout -b other
28 t-some-changes other '' -other
29
30 git branch other-before-new-upstream
31
32 t-git-debrebase new-upstream 2.1
33 t-git-next-date
34
35 : ----- prepare master -----
36
37 git checkout master
38 t-git-debrebase new-upstream 2.1
39 t-git-next-date
40
41 git branch master-before-merge
42
43 : ----- make the merge -----
44
45 git merge -s ours other
46
47 # we have to do a little dance to make this not a pseudomerge
48 t-git-next-date
49 dch -a 'Merge, only conflict was in debian/changelog'
50 t-dch-r-rune dch
51 git commit -a --amend --no-edit
52
53 t-expect-fail F:'divergent anchors' \
54 t-git-debrebase
55
56 : ===== late failure in apply =====
57
58 git checkout other
59 git reset --hard other-before-new-upstream
60
61 echo other-upstream-confict >>docs/README
62 git commit -m 'other-upstream-conflict' docs/README
63
64 t-git-debrebase quick
65
66 : ----- make the merge -----
67
68 git checkout master
69 git reset --hard master-before-merge
70
71 t-merge-conflicted-stripping-conflict-markers other docs/README
72
73 : ----- expect failure -----
74
75 t-expect-fail F:'docs/README' \
76 t-git-debrebase
77
78 # xxx want to check wrecknotes appear
79
80 t-ok