mirror of
https://github.com/fortressforever/git-svn-sync.git
synced 2025-06-03 18:40:55 +00:00
This contains multiple scripts: - A script to synchronize an existing git repository with subversion via a git synch client - hooks for the git server to trigger the sync after a push - a hook for the client to reject every manual change - A script to create a new git server repository, along with the git synch client, starting from an existing subversion repository.
19 lines
491 B
Bash
Executable file
19 lines
491 B
Bash
Executable file
# -*- mode: Shell-script-*-
|
|
#!/usr/bin/bash
|
|
#
|
|
# This hook is intended to be installed for a git server. It calls a
|
|
# script that synchronizes every change with subversion.
|
|
#
|
|
# Required environment variables:
|
|
# - GIT_SCRIPTS: directory where the git sync scripts are located
|
|
#
|
|
# Author: Mario Fernandez
|
|
|
|
master="refs/heads/master"
|
|
|
|
while read oldrev newrev refname
|
|
do
|
|
if [ "$master" == "$refname" ] ; then
|
|
sh ${GIT_SCRIPTS}/git-sync-with-svn.sh $(basename $PWD .git)
|
|
fi
|
|
done
|