12

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.

Community
  • 1
  • 1
ccook
  • 5,869
  • 6
  • 56
  • 81
  • It seems to me that having two files in the same directory differing only by case is bound to cause confusion anyway. Can the users be told not to do that? – Michael Kohne Feb 27 '09 at 15:46
  • +1 on forcing subversion to ignore case - you shouldn't be differentiating files only on case anyway. – stephen mulcahy Feb 27 '09 at 15:53

4 Answers4

11

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.

Suma
  • 33,181
  • 16
  • 123
  • 191
Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
  • Ahh, thank you. Yea, we are being careful, but any measure to prevent this would be a plus for sure. – ccook Feb 27 '09 at 15:25
2

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

jpierson
  • 16,435
  • 14
  • 105
  • 149
0

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.
  • 7,099
  • 1
  • 38
  • 42
  • 1
    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 Feb 27 '09 at 15:23
0

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
  • 107,306
  • 24
  • 181
  • 206
  • 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 Feb 27 '09 at 19:04
  • 4
    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 Oct 09 '09 at 11:20