chiark / gitweb /
Test suite: Add t-tstunt-parsechangelog to a couple of tests
[dgit.git] / tests / tests / inarchivecopy
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-setup-import examplegit
6 t-tstunt-parsechangelog
7
8 cd $p
9 git checkout -b dgit/stable dgit/dgit/stable
10 cd ..
11
12 t-inarchive-copy () {
13         local vm=$1
14         local from=${2:-sid}
15         local to=${3:-stable}
16         egrep "^${vm//./\\.}" aq/package.$from.$p >>aq/package.$to.$p
17         t-archive-updated stable $p
18 }
19
20 copy-check-good () {
21         git diff $vtag
22         t-refs-same refs/remotes/dgit/dgit/stable
23         t-ref-head
24 }
25
26 copy-check () {
27         local vm=$1
28         t-inarchive-copy $vm
29
30         vtag=$(v=$vm t-v-tag)
31
32         cd $p
33          t-refs-same-start
34          t-ref-same $vtag^1
35
36          t-dgit fetch stable
37          git merge --ff-only dgit/dgit/stable
38
39          copy-check-good
40          local fetched=$(t-sametree-parent HEAD)
41         cd ..
42
43         rm -rf example.cloned
44         t-dgit clone $p stable example.cloned
45
46         cd example.cloned
47          t-refs-same-start
48          copy-check-good
49          local cloned=$(t-sametree-parent HEAD)  
50         cd ..
51
52         t-refs-same-start
53         t-ref-same-val fetched $fetched
54         t-ref-same-val cloned $cloned
55 }
56
57 copy-check 2.0
58
59 copy-check 2.1
60
61 echo ok.