Can SVN handle case sensitivity issues?

前端 未结 4 1334
-上瘾入骨i
-上瘾入骨i 2021-01-04 10:52

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

相关标签:
4条回答
  • 2021-01-04 11:20

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

    0 讨论(0)
  • 2021-01-04 11:30

    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.

    0 讨论(0)
  • 2021-01-04 11:40

    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.

    0 讨论(0)
  • 2021-01-04 11:40

    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!

    0 讨论(0)
提交回复
热议问题