views:

1311

answers:

3

Is there a way to force SVN to be case insensitive? We have an issue where a user commits from a linux environment with files say "file.ext" and "File.ext". Works just fine. The problem, however, is when a user on a MAC OSX or Windows attempts an update/checkout. The two files are considered the same and the action fails in error.

Is there a way to have SVN prevent the committing of "File.ext" and "file.ext" in the first place?

This question is similar but looks at the same problem from the Windows side, which is not the issue here.

A: 

I would say you are looking at things the wrong way around. The best solution here is to maintain your files to a case sensitive manner. What if a user checks out in Linux or Solaris, the project will be unusable.

Also, consider some language compilers that depend on the case sensitivity, the Java compiler will complain about the file names, as I am sure other languages will.

Another issue, is deployment, what if you deploy on a *NIX system. Then your in trouble!

ng
The problem is simply that two files differing in case only does not work for the macs or windows machines. I think you are referring more of the application (F90)? I agree that names should be referenced by proper case.
ccook
+5  A: 

You could try a pre-commit hook, such as this one (didn't try it myself, however).

I assume that getting your users watch out for it has already been ruled out? I work on Linux all the time, but typically consider filenames case-insensitive, i. e. to me, they are the same, no matter what the OS thinks.

Hanno Fietz
Ahh, thank you. Yea, we are being careful, but any measure to prevent this would be a plus for sure.
ccook
+2  A: 

I think the technical problem really is on the Mac & Windows side, namely that their file systems aren't case-sensitive. At least on the mac, you can re-format the file system as HFS+ with case-sensitivity turned on. I'm not a Windows user but there may be a similar option in Windows' native file system (is it still NTFS?).

If you don't control the developer's environments enough to force them to format with a case-sensitive file system, then I think your only options are a pre-commit hook that checks for duplicate (case-insensitive comparison, obviously) file names in the same directory or to modify your project to not use files with the same name and different case in the same directory.

Barry Wark
I posted a response to yet another version of this question that I can't find right now that basically indicated how to compile SVN on Windows so names really would be case sensitive. Since NT4 passed POSIX conformance tests, this is here, just tricky to get at it.
Joshua
I'm not sure whether that's really a technical problem, I think it's a feature (and I'm a Linux user). To humans, the same word in upper or lower case has the same meaning, and your OS should understand that.
Hanno Fietz