Tag: scripts
Moving Repos and Redmine from SVN to Git
by Christoph Olszowka on Sep.11, 2009, under rails, ruby
Sorry for not posting in a long time (again), but I’ve been pretty busy with summer vacations, work, of course, The Ruby Toolbox and did not have any time to work on some OSS stuff.
What I did do, though, was to migrate two of our major app repositories from Subversion to Git together with my fellow colleague at Capita Unternehmensberatung, Sebastian, who despite being very jealous of my fancy new HTC Hero being so much cooler than his grumpy old T-Mobile G1, joined me on this one
Our main goals were to retain our Release Tags from SVN as Git Tags (not Branches!), which worked out perfectly after working through a couple of online resources on this topic, as well as updating our Redmine issue comments and time entries that included references to specific commits to reflect the changes in revision numbering.
For migrating the repositories, I’ve put together the required steps based upon this, this, and this into a gist, which you can work through manually and should end up with a sweet git repo. Only thing remaining is to set up a bare repository on your scm-server (git init –bare) and push everything over there (at least as long as you sticked to the default SVN repository structure of /tags, /branches and /trunk – everything else you’ll probably have to mess around with the listed commands).
For moving Redmine, we created a simple Ruby script which will work through all your git commit messages, create a hash out of the included svn revision id’s (from the initial migration), connect to your Redmine database and update everything properly. It’s also a gist. Remember you’ll have to do this on your Redmine server.
Further instructions and comments are also included inside the two gists, so check them out:
Happy migrating!
RDoc index for your Gems
by Christoph Olszowka on Feb.13, 2009, under Ubuntu, ruby
I just posted a tiny script on gist.github.com I wrote recently for usage on my dev machine that will create a HTML index for your locally installed RubyGems because I got really tired of having to browse through extraordinarily long paths to get to that local RDoc for ActiveRecord 2.0.2.
Just generate the index with the script, bookmark the index.html file in the output directory and get immediate access to your local RDocs. You might also want to put the script into a cron job for automatic updating.
Here’s a screenshot of the index in action on my machine:
The code is certainly not beautiful or anything, but it works for me and hopefully for you too!
Get the thing here: Local RDoc Index Generator






