-: ---- "setup up the mirror hook in a basic way" ----
-
-reposmirror=$tmp/git-mirror
-queuedir=$tmp/git/_mirror-queue
-mkdir $reposmirror
-
-mhook=$drs_dispatch/mirror-hook
-ln -sf ${DGIT_INFRA_PFX}dgit-mirror-rsync $mhook
-mhook () {
- "$mhook" "$drs_dispatch" "$@"
-}
-
->$drs_dispatch/mirror-settings
-mset () { echo >>$drs_dispatch/mirror-settings "$1"; }
-
-mset remoterepos="$reposmirror"
-
-commit-build-push-expect-log () {
- local msg=$1
- local mpat=$2
- t-commit "$msg"
- t-dgit build
- LC_MESSAGES=C \
- t-dgit push --new 2>&1 |tee $tmp/push.log
- t-grep-mpat "$mpat" $tmp/push.log
-}
-
-check-mirrored () {
- t-reporefs master
- t-reporefs mirror $pmirror
- diff $tmp/show-refs.{master,mirror}
- cat $queuedir/$p.log
- t-files-notexist $queuedir/$p.{n,a,lock,err}
-}
-
-check-not-mirrored () {
- # uses previous t-reporefs-master
- t-reporefs mirror $pmirror
- diff $tmp/show-refs.{master,mirror}
-}