chiark / gitweb /
9b37ca62e11622769ab2857de13f6ddadc899702
[dgit.git] / tests / tests / gdr-diverge-nmu
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-dependencies git-buildpackage libfile-fnmatch-perl faketime
6
7 t-setup-import gdr-convert-gbp
8
9 cd $p
10
11 t-dgit setup-mergechangelogs
12
13 : 'non-dgit upload (but we prepare it with dgit anyway)'
14
15 t-git-next-date
16
17 v=2.0-2+nmu1
18 t-nmu-upload-1 nmu
19 gbp pq import
20 t-nmu-upload-2
21 t-nmu-commit-an-upstream-change
22 t-nmu-upload-3
23
24 : 'done the nmu, switching back to the maintainer hat'
25
26 t-git-next-date
27
28 v=2.0-3
29 t-maintainer-commit-some-changes
30
31 t-dgit fetch
32 t-git-next-date
33
34 t-expect-fail E:'Not.*fast-forward' \
35 git merge --ff-only dgit/dgit/sid
36
37 : 'ad hocery'
38
39 git cherry-pick 'dgit/dgit/sid^{/UPSTREAM NMU}'
40
41 t-expect-fail 'Automatic merge failed; fix conflicts' \
42 git merge --squash -m 'Incorporate NMU' dgit/dgit/sid
43
44 git rm -rf debian/patches
45 git commit -m 'Incorporate NMU'
46
47 git merge -s ours -m 'Declare incorporate NMU' dgit/dgit/sid
48
49 : 'right, how are we'
50
51 t-git-next-date
52
53 t-git-debrebase
54 t-gdr-good laundered
55
56 t-git-debrebase stitch
57 t-gdr-good stitched
58
59 : 'check that what we have is what is expected'
60
61 git checkout -b compare.nmu origin/master~0
62 git checkout patch-queue/nmu .
63 git rm -rf debian/patches
64 git commit -m 'rm patches nmu'
65
66 git checkout -b compare.maintainer origin/master~0
67 git checkout did.maintainer .
68 git rm -rf --ignore-unmatch debian/patches
69 git commit --allow-empty -m 'rm patches maintainer'
70
71 git merge compare.nmu
72 git diff --quiet master
73
74 : 'check that dgit still likes it'
75
76 git checkout master
77 t-dgit -wgf quilt-fixup
78
79 t-ok