Category Archives: Uncategorized

Subversion to git migration

I have done a major project trying to migrate a large open source (Geomajas) from subversion to git. The conversion did not actually happen as the community voted against it, but there were quite a few lessons learned along the way.

To import the subversion repository, you need to create an authors file specifying the e-mail address for each committer. It looks something like

joachimvda = joachim Van der Auwera <>
other = Someone Else <>

You can then use the following command to import the subversion repository

mkdir backend
cd backend
git svn init --trunk= --tags= --branches=
git svn fetch --authors-file=../authors.txt 

If you get the following exception on the fetch

perl: /build/buildd/subversion-1.6.6dfsg/subversion/libsvn_subr/path.c:115: svn_path_join: Assertion `svn_path_is_canonical(component, pool)' failed.
error: git-svn died of signal 6

then you have to remove the double slashes after the urls in your .git/config file.

You can just redo the “git svn fetch –authors-file=../authors.txt”.

Once the import from subversion is done, you can set the remote.
git remote add origin GIT_URL

And you can then push that using
git push -mirror origin master

After that you are ready to work. You can re-synchronize with the base subversion repository using

git svn rebase
git svn dcommit

Unfortunately though, this does not work seamlessly when pulling in changes from both the remote git repository and the subversion repository. As git-svn is rewriting the commits (to include subversion revision numbers), commits will be undone and redone continuously. The “git svn rebase” may force you to do a “git rebase –skip” a couple of times.

If you rrepository includes many maven modules which need to be released separately, you will need to hack a little to make this work. The scm tags in the maven project do not allow you to specify a base directory in the repository. This causes your entire repository to be tagged (no big deal) and checked out for the release build.
The solution is to stop the build during the “mvn release:perform”. Then

cd target/checkout
mvn -DperformRelease deploy

git push –tags

As I said in the beginning, the migration was denied. Apparently, the git support in eclipse is sub-par, which would make it more difficult to use for some some of the core developers. There are some tests with Mercurial ongoing as we speak. We’ll see how that goes. Sonatype is also working on an improved egit for Maven IDE, maybe that is also an option for the future.

Hudson builds suddenly fail, “due to a bug in the code”

All builds suddenly fail with the following message:

ERROR: Processing failed due to a bug in the code. Please report this to
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of 
  at net.sf.json.util.JSONTokener.syntaxError(
  at net.sf.json.JSONObject._fromJSONTokener(
  at net.sf.json.JSONObject._fromString(
  at net.sf.json.JSONObject.fromObject(
  at net.sf.json.JSONObject.fromObject(
  at hudson.model.DownloadService$Downloadable.getData(

For some reason this is caused by the $HUDSON_HOME/updates/hudson.tasks.Maven.MavenInstaller file which was empty.
Putting “{}” (an empty JSON object) in there allowed builds to work again.

Geomajas roadmap input

Please provide input for the Geomajas roadmap at either the majas-dev mailing list or the forum.

We need the input from the community to see how to best improve the project, which direction we should be heading and to help determine priorities.

The input will be used for the Geomajas roadmap poster at the FOSS4G conference in Barcelona, Spain in September.