blob: b1b902549fa9238a6a5a53c8ef432600dceee080 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/bash
set -e
. tests/lib
. $troot/lib-reprepro
t-setup-import examplegit
t-tstunt-parsechangelog
prep () {
dscf=$tmp/mirror/pool/main/example_$v.dsc
}
check () {
rm -rf $p.cloned
t-refs-same-start
t-archive-none $p
t-archive-query $suite
t-dgit clone $p $suite $p.cloned
cd $p.cloned
t-ref-head
$1
t-dgit import-dsc $dscf +imported
t-ref-same refs/heads/imported
cd ..
}
reset () {
cd ..
rm -rf $p.cloned
mkdir $p.cloned
cd $p.cloned
git init
}
: ---------- newer ----------
suite=sid
v=2.1
prep
perl -i~ -pe 's/^Dgit: .*/$& EXTRA DATA\n TO BE IGNORED/' $dscf
check reset
: ---------- newline ----------
suite=testing
v=2.0
prep
perl -i~ -pe 's/^(Dgit: \w+ \S+ \S+) (.*)/$1\n $2 EXTRA/' $dscf
check
: ---------- older ----------
suite=stable
v=1.2
prep
perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf
t-git-config dgit.default.old-dsc-distro test-dummy
check
t-ok
|