Sunday, March 1, 2009

Subversion and case-insensitive file systems

And solutions to problems this can cause

I work on MacOSX and it along with Windows has a case-insensitive file system. This has caused me pain on a number of occassions.

It looks like this:

> svn st
? Apache2
! apache2

Caused by renaming the file.

This is usually easily solved by renaming the file back again, but if you do some commits or other commands it can seem to cause a problem where Subversion claims it is locked but 'clean' doesn't have any effect. But not all is lost.

However I don't have a linux box (something that will change soon) and the second didn't work for me. This worked:

> cd .. # parent directory
> mv <parentdir_name> <parentdir_name>x
> svn up <parentdir_name>

Then fix up any changed files from the directory that has the same (case-insensitive) file name. And delete the <parentdir_name>x.


This will lead on to me posting one day about how I use Subversion as my backup mechanism and to help manage my home directory across multiple machines.

Let me know if you are keen for me to write this up.


Why are we here?

This is my 6th blog and despite being a Software Engineer and geek, I've hardly blogged against my black art.

Can't wait to get started ...