chiark / gitweb /
test suite: gbp2gdr: use -f<tag> rather than --force
[dgit.git] / tests / setup / gbp2gdr
1 #!/bin/bash
2 set -e
3 . tests/lib
4 . $troot/lib-gdr
5
6 t-dependencies git-buildpackage
7
8 t-tstunt-parsechangelog
9
10
11 not-gdr-processable () {
12         t-expect-fail F:'Cannot cope with this commit' \
13         t-git-debrebase
14 }
15
16 p=example
17 t-worktree 1.1
18
19 cd example
20
21 : 'fake up some kind of upstream'
22 git checkout -b upstream quilt-tip
23 rm -rf debian
24 mkdir debian
25 echo junk >debian/rules
26 git add debian
27 git commit -m "an upstream retcon ($0)"
28
29 : 'fake up that our quilt-tip was descended from upstream'
30 git checkout quilt-tip
31 git merge --no-edit -s ours upstream
32
33 : 'fake up that our quilt-tip had the patch queue in it'
34 git checkout patch-queue/quilt-tip
35 gbp pq export
36 git add debian/patches
37 git commit -m "patch queue update ($0)"
38
39 not-gdr-processable
40
41 : 'fake up an upstream 2.0'
42 git checkout -b make-upstream upstream
43 echo upstream-v2 >>docs/README
44 git commit -a -m "an upstream v2 update"
45 ust=example_2.0.orig.tar.gz
46 git archive -o ../$ust --prefix=example-2.0/ make-upstream
47
48 : 'see what gbp import-orig does'
49 git checkout quilt-tip
50 gbp import-orig --debian-branch=quilt-tip --upstream-version=2.0 ../$ust
51
52 not-gdr-processable
53
54 t-git-debrebase -fupstream-has-debian gbp2debrebase
55
56 : xxx
57 t-ok
58 exit 0
59
60
61 git checkout quilt-tip
62 git merge --no-edit --allow-unrelated-histories -Xtheirs --no-commit upstream
63 git checkout HEAD -- debian
64 git commit --no-edit
65
66
67
68 false
69
70 revision=1
71
72 push-to () {
73         t-refs-same-start
74         t-ref-head
75         t-dgit build
76         t-dgit push --new $2
77         t-pushed-good $1 $2
78         t-archive-process-incoming $2
79 }
80
81 echo ancestor >which
82 git add which
83 t-commit Ancestor '' stable
84 push-to master stable
85
86 git checkout -b stable
87
88 echo stable >which
89 git add which
90 t-commit Stable '' stable
91 push-to stable stable
92
93 git checkout master
94
95 majorv=2
96 revision=0
97
98 echo sid >which
99 git add which
100 t-commit Sid
101 push-to master sid
102
103 echo sid-again >>which
104 git add which
105 t-commit Sid
106 push-to master sid
107
108 t-setup-done 'p v suitespecs majorv revision' "aq git mirror $p"
109
110 t-ok