开发者

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 wh开发者_开发技巧en 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.


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).


I ran into the same problem recently (running Windows), and was not able to figure it out.

For Mac users, someone had written instructions though:

  1. Use apple's Disk Utility app to create a new sparse disk image of type Mac OS Extended (case-sensitive,journaled)
  2. Mount the new disk image
  3. check out pet sources to this image


Lauri Lehtinen's answer looks good. However, if you need to work with the files in a case insensitive system you'll have to rename them anyway. You can rename them in the repository before you check them out using the svn move command.

$ svn help rename
move (mv, rename, ren): Move and/or rename something in working copy or repository.
usage: move SRC... DST
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜