chiark / gitweb /
done
[dgit-junk.git] / copy-alioth-to-gideon
index c82741b1781fe842c97d078a05528f22099206ca..6a3ff9e5622e685566e9929d5df7a2d029cb9b07 100755 (executable)
@@ -26,10 +26,24 @@ ssh iwj@gideon.debian.org "
                exit 1
        fi
 
+       (
+        cd $d/transfer.tmp
+        mv irker.git irker.arrgh
+        cp -a _template irker.git
+        cd irker.git
+        git fetch -p ../irker.arrgh "+refs/heads/dgit/*:refs/dgit/*"
+       )
+
        set +x
        for f in $d/transfer.tmp/*.git; do
                cp $d/repos/_template/description $f/description
                touch $f/git-daemon-export-ok
+               (export GIT_DIR=$f
+                master=`git for-each-ref "[r]efs/heads/master"`
+                sid=`git for-each-ref "[r]efs/dgit/sid"`
+                if [ "x$master" = x ] && [ "x$sid" != x ]; then
+                       git update-ref refs/heads/master refs/dgit/sid
+                fi)
        done
 
        cat <<END >$d/transfer.run
@@ -39,8 +53,8 @@ ssh iwj@gideon.debian.org "
                # _template
                echo done locally, copying...
 
-               distrodir=/srv/dgit.debian.org/dispatch-dir/distro\=debian
-               $distrodir/mirror-hook $distrodir/mirror-hook all
+               distrodir=$d/dispatch-dir/distro\=debian
+               \$distrodir/mirror-hook \$distrodir all
                echo done all.
 END
        chmod +x $d/transfer.run