<p>We encountered a problem with using Subversion on Windows. A developer committed a file <code>foo.Data.sql</code> and later another developer committed a file called <code>foo.data.sql</code>. Naturally, this caused a problem on Windows clients (all clients are Windows in our environments) because files are case sensitive in Subversion but not in Windows.</p>

<p>We managed to resolve this problem by deleting one of the files directly in the repository, but I still have two questions:</p>

<ol>
<li>How is it possible for a developer to do this using a Windows client? Does he have an invalid working copy, or is there a bug in the client (TortoiseSVN)?</li>
<li>How can we prevent changes like these from entering the repository (i.e. has anyone written a hook script that performs a sanity check for file casing issues)?</li>
</ol>

[{'answer_id': 56038, 'author': 'Biri', 'author_id': 968, 'author_profile': 'https://Stackoverflow.com/users/968', 'pm_score': 0, 'selected': False, 'text': '<p>1; It is possible, because the two files came from two developers. One is renaming or creating the file with different cases and during commit does not realise that it will be an add not a commit changes.</p>\n\n<p>2; Check <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-rename.html#tsvn-dug-renameincase" rel="nofollow noreferrer">TortoiseSVN FAQ</a></p>\n'}, {'answer_id': 56043, 'author': 'JonTheNiceGuy', 'author_id': 5738, 'author_profile': 'https://Stackoverflow.com/users/5738', 'pm_score': 3, 'selected': True, 'text': '<p>There is definitely a hook script that checks case sensitivity - Sourceforge have it as one of their options. A quick google turns up: <a href="http://www.subversionary.org/howto/using-check-case-insensitive-py-on-windows" rel="nofollow noreferrer">http://www.subversionary.org/howto/using-check-case-insensitive-py-on-windows</a> and <a href="http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py" rel="nofollow noreferrer">http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py</a></p>\n\n<p>The issue will have arisen on a windows platform if user 1 added foo.data.sql and user 2 added foo.Data.sql before getting an update from user 1. </p>\n\n<p>Hope that helps :)</p>\n'}, {'answer_id': 56058, 'author': 'Brannon', 'author_id': 5745, 'author_profile': 'https://Stackoverflow.com/users/5745', 'pm_score': 2, 'selected': False, 'text': "<p>On Windows, files are case-insensitive, but case-preserving.  You can rename a file, changing the case and Windows will preserve the change.  The problem occurs when Subversion tries to create the second file.  Windows reports that the file already exists.</p>\n\n<p>If you wanted to merge the two files into a single copy, instead of deleting the file in the repository, you could rename the bad file in the repository (i.e. append a suffix like '.temp'), update the client, merge into the good file, and then delete the bad file.</p>\n"}]
['https://Stackoverflow.com/questions/56022', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2822/']