chiark / gitweb /
git-debrebase: merge: Make mwrecknote call printdebug
[dgit.git] / tests / lib-mirror
1
2 t-mirror-setup () {
3         # p must be set already
4
5         reposmirror=$tmp/git-mirror
6         pmirror=$reposmirror/$p.git
7         queuedir=$tmp/git/_mirror-queue
8
9         mkdir $reposmirror
10
11         mirror_hook=$drs_dispatch/mirror-hook
12         t-make-hook-link dgit-mirror-rsync $mirror_hook
13
14         >$drs_dispatch/mirror-settings
15         t-mirror-set remoterepos="$reposmirror"
16
17         t-mirror-hook setup
18 }
19
20 t-mirror-set () {
21         echo >>$drs_dispatch/mirror-settings "$1"
22 }
23
24 t-mirror-hook () {
25         : '(((((((((((((((((((((((((((((((((((((((('
26         "$mirror_hook" "$drs_dispatch" "$@"
27         : '))))))))))))))))))))))))))))))))))))))))'
28 }
29
30 t-check-mirrored () {
31         t-reporefs master
32         t-reporefs mirror $pmirror
33         diff $tmp/show-refs.{master,mirror}
34         cat $queuedir/$p.log ||:
35         t-files-notexist $queuedir/$p.{n,a,lock,err}
36 }
37
38 t-check-not-mirrored () {
39         # uses previous t-reporefs-master
40         t-reporefs mirror $pmirror
41         diff $tmp/show-refs.{master,mirror}
42 }