Sunday 5 June 2011

Eclipse SVN commit to USB disk issue.

I have created my local project repository on a USB stick so that I can work anywhere without a SVN server. But when I work on my Macbook, Eclipse's built-in svn function cannot commit changes properly to the USB disk. (get java.nio.channels.OverlappingFileLockException). I found no solutions to the problem on Google. Maybe just because too few people actually using USB stick to store there SVN repos since there are many known disadvantages to do so. But I would like to try it anyway.

After playing around eclipse and my USB stick, I found the problem happens when using Eclipse Mac OS; and in addition the USB has Fat format. I've heard ppl using Windows do not suffer this problem. And if I format my disk with Mac OS Extended format, the problem has gone, too.

There is a work around to the problem that is to use svn+ssh://... URL instead of file://... I do not understand why this solves the problem, and it all looks silly that using ssh protocol to connect to localhost in order to access my local files. I guess in this way, Eclipse's SVN module doesn't perform the write/save operation, and hence avoided the exception.

I do not like this work around because I need to enable SSH access on my Mac OS, even though it is very easy to do so. Hope there can get it fixed somehow.

No comments:

Post a Comment