2

I discovered an issue today regarding Subversion support for file name's case sensitivity.

I committed a class named 'ClassOne.file'. Another person committed another file, 'Classone.file'. Both files are exactly the same except the file name.

When I do SVN update, it says error, "unable to add, the file already exists". I noticed that in SVN respository, both files exist, but I cannot update my local copy. It halts there.

What I do is delete one of them and only then the SVN update resumes as usual. The SVN server is running on Linux, but our PC are running windows.

My questions:

  • Is this a standard configuration in SVN?
  • How to avoid this kind of error (other than enforcing everybody to use the same file naming convention)?

Advanced thanks for your kind help!

1
  • The root of the problem is that MS-Windows, and as a consequence some developers, are case insensitive.
    – starblue
    Apr 3, 2009 at 13:20

1 Answer 1

7

http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py

Exactly what you need :)

Just dump that in your

/svnroot/<repos>/hooks/pre-commit 

file, and BAM, problem will never repeat.

In response to comment

You have to edit the hooks for your repository; Working Copies don't have hooks. Locate your repository on your filesystem, then under a folder called "hooks" you will see a file called "pre-commit.tmpl" just rename that to "pre-commit" and edit it by adding in the code found above :)

3
  • Thanks! How do I do this within Eclipse? I can't find any menu / option for setting the hooks.
    – uuɐɯǝʃǝs
    Apr 4, 2009 at 12:34
  • Your link no longer exists. Indeed, I can find no trace of case-insensitive.py on the web, though I found what appears to be its predecessor, check-case-insensitive.pl. Ironically, this link on the Python version commences with this disclaimer: Do not use this script anymore, use case-insensitive.py which is far more efficient. Even the latest (1.7) TortoiseSVN manual has a broken link on this topic in section 4.14.4: svn.collab.net/repos/svn/trunk/contrib/hook-scripts. Sigh... Dec 22, 2011 at 2:05
  • But I finally found a copy of case-insensitive.py from a similar SO question Can SVN handle case sensitivity issues?. Dec 22, 2011 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.