Wednesday, July 13, 2011

Subclipse on Windows

I ran in to a little glitch with Subclipse (the Eclipse plugin for Subversion access) on Windows.  In general, this plugin works well, but I was using "Team > Add to svn:ignore" to exclude files from version control.  For the first file (a directory, actually), this worked fine.  For the second file, I kept getting an error from the Subversion server (Google project hosting, in my case) when I tried to commit.

I finally suspected that this might be a Windows-specific issue, since multiple entries in svn:ignore are separated with carriage return and/or linefeed. I switched the Subclipse SVN client from the pure Java SVNKit to JavaHL (under Window > Preferences > Team > SVN).  This (mostly) resolves the issue.  You still sometimes get a conflict on the project when you try to commit a change to the svn:ignore property.  This conflict can be fixed by first selecting to update the project file from the Subversion server, then committing your changes to it (that seems strange, I know, but it seems to work and I have not lost any changes yet).

Note that if you are using 64-bit Windows, switching from SVNKit to JavaHL is a little trickier.  If you are using a 64-bit JVM, you will need to separately install a 64-bit version of the JavaHL library.  More details here.

No comments: