summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2010-07-01 13:07:54 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-07-01 13:07:54 +0300
commitb501e398609c671e96896c151205f988b5c87f26 (patch)
tree015287abffb156b1107358cfb4c4a9546679e487
parent57efaafd172bd8dcd75b3543ae835e51eb7b4c9f (diff)
update-git-svn: add -f to force upload
Allow command-line switch -f, to force uploading even if there were no changes in the subversion repository.
-rwxr-xr-xupdate-git-svn16
1 files changed, 14 insertions, 2 deletions
diff --git a/update-git-svn b/update-git-svn
index 9467dd5..aaf5f16 100755
--- a/update-git-svn
+++ b/update-git-svn
@@ -1,12 +1,24 @@
#!/bin/sh
# Push changes from local git-svn mirrors to gitorious repositories:
-REPOS="${1:-asterisk dahdi-linux dahdi-tools libpri octapi}"
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
@@ -37,7 +49,7 @@ for repo in $REPOS; do
sum_before=`remotes_checksum`
git svn fetch --quiet --fetch-all
sum_after=`remotes_checksum`
- if [ "$sum_before" = "$sum_after" ]; then
+ if [ "$sum_before" = "$sum_after" ] && [ "$FORCE_UPLOAD" = 0 ]; then
continue
fi
../asterisk-tools/update_branches