chiark / gitweb /
git-debrebase: test suite: gdr-diverge-nmu: complete
[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 echo >>newsrc.c "// more upstream"
22 git add newsrc.c
23 git commit -m 'UPSTREAM NMU'
24 t-nmu-upload-3
25
26 : 'done the nmu, switching back to the maintainer hat'
27
28 t-git-next-date
29
30 t-dch-commit -v2.0-3 -m 'start -3'
31
32 t-some-changes 'maintainer'
33 t-git-debrebase
34 t-git-debrebase stitch
35
36 git branch did.maintainer
37
38 t-git-next-date
39
40 t-dgit fetch
41 t-git-next-date
42
43 t-expect-fail E:'Not.*fast-forward' \
44 git merge --ff-only dgit/dgit/sid
45
46 : 'ad hocery'
47
48 git cherry-pick 'dgit/dgit/sid^{/UPSTREAM NMU}'
49
50 t-expect-fail 'Automatic merge failed; fix conflicts' \
51 git merge --squash -m 'Incorporate NMU' dgit/dgit/sid
52
53 git rm -rf debian/patches
54 git commit -m 'Incorporate NMU'
55
56 git merge -s ours -m 'Declare incorporate NMU' dgit/dgit/sid
57
58 : 'right, how are we'
59
60 t-git-next-date
61
62 t-git-debrebase
63 t-gdr-good laundered
64
65 t-git-debrebase stitch
66 t-gdr-good stitched
67
68 : 'check that what we have is what is expected'
69
70 git checkout -b compare.nmu origin/master~0
71 git checkout patch-queue/nmu .
72 git rm -rf debian/patches
73 git commit -m 'rm patches nmu'
74
75 git checkout -b compare.maintainer origin/master~0
76 git checkout did.maintainer .
77 git rm -rf --ignore-unmatch debian/patches
78 git commit --allow-empty -m 'rm patches maintainer'
79
80 git merge compare.nmu
81 git diff --quiet master
82
83 : 'check that dgit still likes it'
84
85 git checkout master
86 t-dgit -wgf quilt-fixup
87
88 t-ok