summaryrefslogtreecommitdiff
path: root/update-git-svn
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2010-09-04 00:40:03 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-09-04 00:40:03 +0300
commit8ca7d17ada40ad376e5a14f4bd5e32ef03abe11d (patch)
treed1fe5015f2632102607d1de91c3ed249e122da1e /update-git-svn
parent4e35eb660d9dc51a02ef7b4b61c8aa7ce4ebc820 (diff)
update-git-svn: rename to fit naming convention
Diffstat (limited to 'update-git-svn')
-rwxr-xr-xupdate-git-svn58
1 files changed, 0 insertions, 58 deletions
diff --git a/update-git-svn b/update-git-svn
deleted file mode 100755
index aaf5f16..0000000
--- a/update-git-svn
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# Push changes from local git-svn mirrors to gitorious repositories:
-BASE_DIR=/home/git
-PUSH_MIRROR=gitorious
-FORCE_UPLOAD=0
-
-set -e
-
-while getopts 'fh' opt; do
- case "$opt" in
- f) FORCE_UPLOAD=1;;
- h) usage; exit 0;;
- \?) usage; exit 1;;
- esac
-done
-
-shift $((OPTIND-1))
-
-REPOS="${1:-asterisk dahdi-linux dahdi-tools libpri octapi}"
-
-# An explicit list of heads to mirror. Don't push any random working branch
-# svn_* - branchs
-# v[0-9]* - tags
-# vPR[0-9]* - tags of octapi
-mirrored_refs() {
- ls .git/refs/heads/ | grep '^svn_'
- ls .git/refs/tags/ | egrep '^v(|PR)[0-9]\+\.'
-}
-
-mirror_repo() {
- # Sanity check: make sure we already set up mirroring:
- if ! grep -q "^\[remote \"$PUSH_MIRROR\"\]" .git/config; then
- return
- fi
- # FIXME: make less noisy?
- git push --thin --force "$PUSH_MIRROR" `mirrored_refs`
-}
-
-# A quick snapshot of this repository. To help check if anything changed:
-remotes_checksum() {
- grep . .git/refs/remotes/* .git/refs/remotes/tags/* \
- | sha1sum | cut -d' ' -f1
-}
-
-for repo in $REPOS; do
- cd $BASE_DIR/$repo
- git checkout --quiet master
- sum_before=`remotes_checksum`
- git svn fetch --quiet --fetch-all
- sum_after=`remotes_checksum`
- if [ "$sum_before" = "$sum_after" ] && [ "$FORCE_UPLOAD" = 0 ]; then
- continue
- fi
- ../asterisk-tools/update_branches
- ../asterisk-tools/update_tags
- mirror_repo
-done