Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to checkout a case sensitive SVN source code branch to a case insensitive system?

I am working on a Macbook system , which is formatted as a case insensitive system. The issue is that, I need to check out a SVN branch which has some case sensitive files in it. Example:

inbuilt-file.c
InBuilt-File.c

How do I checkout this branch when both the files are in the same folder? When I try and checkout, it gives me an error stating that an unversioned file of the name already exists.

like image 523
gagneet Avatar asked Dec 10 '22 15:12

gagneet


1 Answers

The ways that immediately come to mind are:

  1. Stop using case sensitive file names. There really is no reason to have Foo.c and foo.c being different things.

  2. Stop using a case insensitive file system. You can format HFS+ volumes to be case-insensitive on Mac OS X although Adobe Creative Suite and World of Warcraft will moan about it.

  3. Check it out onto a DMG file formatted with case-sensitive HFS+. Create it in Disk Utility or with a command like this: hdiutil create -size 100m -fs "Case-sensitive HFS+" -volname CaseSensitive CaseSensitive.dmg

  4. A slightly hare-brained idea: use git svn and write some hooks that'd automatically translate the file names where the case sensitivity is an issue into a modified filename that follows a particular standard when you check-out and then checks them back in again with the right filename. Of course, this would break your build scripts and dependencies and so on because the file would still not have the right name. So you'd then need to start a branch, which gets you back to having to use something like git svn. This seems unnecessarily painful compared to (1).

like image 191
Tom Morris Avatar answered Jan 26 '23 00:01

Tom Morris