git svn clone -s svn://svn.example.com/module
That took ages (3 days for all of the stuff I need to work on) and was quite slow when doing commits. My backups are mildly corrupt too, so I've started over, and set it up properly this time. Thanks to the guide here.
On the server, I created a directory to hold the git mirrors, and a text file containing the SVN modules that I wanted initially. Then a simple bash script to loop through the file and create a mirror of each SVN module:
for f in `cat svn-modules.txt` ; do svn2git.sh $f ; done
Then just make the repositories available:
git-daemon --export-all --base-path=/opt/git --verbose
and create a cron job to refresh the git mirrors periodically.
git --bare svn fetch --all
There are other ways, but that's the quick-n-dirty approach. Then a similar script on the client, which used the same list of modules that I wanted to check out.
Benefits of this approach:
- Much faster to set up - it took just over a couple of hours this time.
- Available to other people to try out - not just me.
- Provides a migration path off SVN as we eventually migrate off SVN (my long-term aim, muhahaha)
No comments:
Post a Comment