aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-13 14:36:21 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-13 14:36:21 +0000
commit30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb (patch)
tree20f085c119f98c7eb7234d3b8b65e66ba527908b
parentca86f90c1d5fb9c66c82d40f94a26579adcdbf36 (diff)
downloadgsc-30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb.tar.gz
gsc-30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb.tar.bz2
Bugfixes
git-svn-id: file:///svnroot/gsc/trunk@336 d2de0444-eb31-0410-8365-af798a554d48
-rw-r--r--ChangeLog8
-rwxr-xr-xgit/git-svn-mirror-finish35
-rwxr-xr-xgit/git-svn-mirror-synch1
3 files changed, 43 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea7f7e6..6be08b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,2 +1,10 @@
+2009-02-13 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ Bugfix
+
+ * git-svn-mirror-synch: Call git reset.
+ * git/git-svn-mirror-finish: Install SVN hook and add a README.git
+ file to SVN.
+
2009-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
diff --git a/git/git-svn-mirror-finish b/git/git-svn-mirror-finish
index 41f5ba9..04d2a4b 100755
--- a/git/git-svn-mirror-finish
+++ b/git/git-svn-mirror-finish
@@ -15,7 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+SVNROOT=file:///svnroot
GITROOT=/gitroot
HEADPFX=
+set -e
+
if [ -r /etc/mirror/git/config ]; then
. /etc/mirror/git/config
@@ -51,5 +54,5 @@ if [ $# -ne 1 ]; then
fi
-cd $GITROOT/$1 || exit 1
+cd $GITROOT/$1
git branch -r |
@@ -78,2 +81,32 @@ if [ -x .git/hooks/pre-receive ]; then
mv .git/hooks/pre-receive .git/hooks/pre-receive.mirror
fi
+
+if test -n "$SVNREADME" -a -r "$SVNREADME"; then
+ readme=$(basename "$SVNREADME")
+ cd /tmp
+ CONAME=$1.$$
+ svn co -q $SVNROOT/$1/trunk $CONAME
+ cd $CONAME
+ if test "$SVNREMOVE" = "yes"; then
+ echo "Removing SVN trunk"
+ svn remove --force --non-interactive *
+ fi
+ echo "Installing the $readme file"
+ if test -x "$SVNREADME"; then
+ $SVNREADME $1 > "$readme"
+ else
+ cp "$SVNREADME" "$readme"
+ fi
+ svn add "$readme"
+ svn commit --non-interactive -m "Add $readme (by $0)"
+ cd /tmp
+ rm -rf "$CONAME"
+fi
+
+if test -n "$SVNHOOK" -a -r "$SVNHOOK"; then
+ echo "Installing SVN pre-commit hook"
+ dir=${SVNROOT##file://}/$1/hooks
+ cp $SVNHOOK $dir/pre-commit
+ chmod +x $dir/pre-commit
+fi
+
diff --git a/git/git-svn-mirror-synch b/git/git-svn-mirror-synch
index 94a341a..95bf13c 100755
--- a/git/git-svn-mirror-synch
+++ b/git/git-svn-mirror-synch
@@ -65,4 +65,5 @@ git branch | sed 's/^\*//' | tr -d ' ' | tee $BRANCHLIST |
done
git checkout master
+git reset --hard refs/remotes/trunk
echo "Checking for new branches & tags..."

Return to:

Send suggestions and report system problems to the System administrator.