October 24, 2011

Making NetBeans 7.0 work with Subversion 1.7

Posted in Java, Netbeans, RCS, Subversion at 13:55 by theBlackDragon

As you might know the newly released Subversion 1.7 uses a different local repository format, no more do you need an .svn folder per directory in your project instead it uses one .svn folder in the root of your project.

The drawback is that new clients don’t support the old format and vice versa. Netbeans 7.0 still ships with an old built-in Subversion client so after upgrading TortoiseSVN and upgrading my repositories to the new format I could no longer use SVN functionality in Netbeans which was a bit annoying.

Theoretically the solution to this is simple: just tell NetBeans to use the TortoiseSVN provided svn binary (or the one that came with your distribution, if using GNU/Linux) in Tools -> Options -> Versioning -> Subversion -> Path to the SVN executable File.

Unfortunately that doesn’t seem to quite work, I’m assuming that due to a bug NetBeans is still trying to use the built in SVN client. The solution to this I found on the NetBeans forums (here) is that you need start NetBeans with the “-J-DsvnClientAdapterFactory=commandline” argument to force it to use the command line client instead of it’s built in one.

I hope this bug gets fixed in the upcoming 7.1 release, in the meantime this workaround seems to be working fine for me.