GeSHi moves to Git

I've been spending the last two weeks importing the GeSHi SVN repository into Git and splitting it up into several repositories.

GeSHi had the old stable version, the new rewrite, misc tools and a repository of code example files all in one single SVN repository. Branches and tags were mixed between both code trees, misc tools even was an own branch without any connection to the other branches.

Initially I used git svn to do the work, then the git filter-branch commands to split the repository up into 4. Showing it to Benny Baumann - GeSHi's maintainer - he complained about merges being not tracked properly; that's something git svn does not get right. He also wanted to get rid of the svn references in the converted commit messages. git svn also did not convert svn:ignore properties.

Reposurgeon

Benny told me to use reposurgeon to do the conversion, and after some tinkering I started.

Reposurgeon is a tool to do cross-VCS conversions and supports CVS, SVN, Git, Mercurial, Bazaar, Darcs and RCS. It claims to be able to do the right thing and leave you with nice and clean target repositories.

For SVN, it does not only convert to git, it also creates your author map file: After setting up the project makefile from conversion.mk, simply run

$ make projectname.map

You'll have a projectname.map file with all authors, ready for you to fill with the author's real names and email addresses. Copy it to projectname.authormap when you're finished with it, then run make without arguments to start the conversion.

Bugs

On the first run, reposurgeon crashed because the twisted structure of GeSHi's SVN repo triggered an edge case bug. After failing to find a bug tracker, I mailed reposurgeon's author, Eric S. Raymond (yes, that one!) and got a reply shortly after. One hour after my bug report, the fix was in reposurgeon's Git repository . Awesome!

I had to fix two other SVN-related bugs in the process, but they were simple one-liners in the makefile.

Final Git repositories

Benny was satisfied with the conversion and announced the new GeSHi Git repositories yesterday.

You can find the repositories at github: old stable version, the new rewrite, misc tools and a repository of code example files

Something else

Since some days, my blog uses GeSHi as syntax highlighting solution, as you can see in several posts .

I still use GeSHi 1.0.x since it's installable via PEAR, but I plan switching to 1.1 soon.

Written by Christian Weiske.

Comments? Please send an e-mail.