Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

Subversion 1.7 now appears to handle case only renames on Windows.

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!

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top