Musings on my family, work and things I find interesting. Mainly, this was / is intended to record things for my kids so that they can get an insight into how I feel about them, plus I haven't done any writing for a long time, so would like to get some skill in that sphere again.
Post-release in maven, I have a lot of svn modules to update:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At work, I've been using git-svn for quite a while. I like the workflow options, and better merging capabilities. As a casualty from the recent laptop hard drive failure, all of my git repositories had gone, checked out from our main SVN server. I'm the only one using git where I work, but I love the workflow that it gives me and going back to SVN is a no-no. That had previously been created by doing a
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple script to checkout a project from git and tie up SVN commits. Should be a lot faster than git svn clone
# Initial parameter is the name of the git /svn module. Optional second parameter is the SVN path. This allows us to manage more complex SVN modules, which may be nested rather than at the top level