chiark / gitweb /
test suite: initial git-debrebase setup attempts
[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/ upstream
47
48 : 'see what gbp import-orig does'
49 gbp import-orig --debian-branch=quilt-tip --upstream-version=2.0 ../$ust
50
51 not-gdr-processable
52
53 : xxx
54 t-ok
55 exit 0
56
57
58 git checkout quilt-tip
59 git merge --no-edit --allow-unrelated-histories -Xtheirs --no-commit upstream
60 git checkout HEAD -- debian
61 git commit --no-edit
62
63
64
65 false
66
67 revision=1
68
69 push-to () {
70         t-refs-same-start
71         t-ref-head
72         t-dgit build
73         t-dgit push --new $2
74         t-pushed-good $1 $2
75         t-archive-process-incoming $2
76 }
77
78 echo ancestor >which
79 git add which
80 t-commit Ancestor '' stable
81 push-to master stable
82
83 git checkout -b stable
84
85 echo stable >which
86 git add which
87 t-commit Stable '' stable
88 push-to stable stable
89
90 git checkout master
91
92 majorv=2
93 revision=0
94
95 echo sid >which
96 git add which
97 t-commit Sid
98 push-to master sid
99
100 echo sid-again >>which
101 git add which
102 t-commit Sid
103 push-to master sid
104
105 t-setup-done 'p v suitespecs majorv revision' "aq git mirror $p"
106
107 t-ok