chiark / gitweb /
Improve "cannot represent change" message
[dgit.git] / tests / tests / gbp-orig
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-tstunt-parsechangelog
6 t-tstunt-debuild
7 t-tstunt-lintian
8
9 t-archive-none example
10 t-git-none
11 t-worktree 1.0
12
13 cd $p
14
15 : '----- construct an unpatched branch with patches -----'
16
17 git checkout patch-queue/quilt-tip
18 gbp pq export
19 : 'now on quilt-tip'
20 git add debian/patches
21 git commit -m 'Commit patch queue'
22
23 : '----- construct an upstream branch -----'
24
25 git checkout --orphan upstream
26 git reset --hard
27 git clean -xdf
28
29 tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig.tar.gz
30
31 mkdir docs
32 cd docs
33 tar --strip-components=1 -xf $troot/pkg-srcs/${p}_1.0.orig-docs.tar.gz
34 cd ..
35
36 git add -Af .
37 git commit -m 'Import 1.0'
38 git tag upstream/1.0
39
40 git checkout quilt-tip
41 t-git-pseudo-merge upstream
42
43 v=1.0-1
44
45 : '----- let gbp build a .orig for comparison -----'
46
47 gbp buildpackage --git-ignore-branch --git-no-sign-tags -us -uc
48
49 mkdir ../gbp-output
50 mv ../*1.0* ../gbp-output/.
51 rm -f ../*.changes
52
53 : '----- now do it ourselves -----'
54
55 t-dgit -wgf --dgit-view-save=split.b gbp-build --git-ignore-branch
56
57 t-dgit -wgf --quilt=gbp clean # gbp leaves dirty trees :-/
58
59 t-dgit -wgf --dgit-view-save=split.p --quilt=gbp push --new
60
61 t-gbp-pushed-good
62
63 : '----- check .origs are the same -----'
64
65 # if gbp weren't weird about .gitignore we could just debdiff the .dscs
66
67 for d in . gbp-output; do
68         cd $tmp/$d
69         mkdir tar-x
70         cd tar-x
71         tar zxf ../${p}_${v%-*}.orig.tar.gz
72 done
73
74 cd $tmp
75 diff -ruN gbp-output/tar-x tar-x
76
77 echo done.