¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>
Setting up a Git-Subversion tracking server

So you want to run your own git-svn tracking server that other people can create Subversion aware git repositories with?

Assuming the Subversion server you want to track is the Cosmo server, the first bit will look familiar:

git clone git://occident.us/cosmo.git cosmo.git
cd cosmo.git
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
git fetch origin
git svn init -t tags -T trunk -b branches svn+ssh://svn.osafoundation.org/svn/server/cosmo/
git svn fetch
or run this.

If you'd like to track a different server, see here.

Next, export your repository using git-daemon as described here. On Ubuntu Edgy Eft it looked something like:

cd GIT_REPOSITORY
touch git-daemon-export-ok
sudo apt-get install git-daemon-run
Now edit /etc/sv/git-daemon/run and change the --base-path argument to point to the directory you'd like git-daemon to start searching for git repostories.

Next:

sudo sv start git-daemon
Finally, to make sure your Subversion clone is kept up to date, set up a Subversion post commit hook that does:
cd GIT_REPOSITORY
git svn fetch
Voila!

Technorati Tags: , , ,