Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Filename Case with TortoiseSVN on Windows

I've been working on a development project using a Windows machine as a test server. Eventually, I'd like the "live" version to end up on a Linux machine. While trying to test on the Linux machine, it became apparent that I needed to change the case of several file names as Windows was case insensitive but Linux wasn't. When I changed the file name case in Windows, TortoiseSVN recognized that the file had changed and marked my folders appropriately. However, when I tried to commit my changes, not only did TortoiseSVN tell me that no changes had been made, but it had actually reverted all of the file name changes I had made back to their original case.

My question is, is there a simple way to alter the file name case from a Windows PC and have the changes appear in my repository? I'd like to avoid any kind of delete, commit, replace, commit scenario to keep my commits tidy if possible. Thanks!

like image 965
Brad Turner Avatar asked Oct 06 '12 20:10

Brad Turner


People also ask

How do I change a filename in SVN?

Renaming a file. Normally you can just use SVN Rename on the context menu. This is analogous to the Move command described in the Moving or Copying a file recipe. It is almost as if you are doing two separate steps: an Add operation with the new name and a Delete operation of the old name.

How do I get rid of TortoiseSVN?

How do I uninstall TortoiseSVN? Simply uninstall from Add/Remove Programs in the Windows control panel. This does not affect your repositories or working copies at all.

What does red exclamation mark mean in TortoiseSVN?

That means the Subversion status is normal. As soon as you start editing a file, the status changes to modified and the icon overlay then changes to a red exclamation mark. That way you can easily see which files were changed since you last updated your working copy and need to be committed.

How do I move files in SVN without losing history?

If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.


2 Answers

Use Rename option in Tortoise SVN from popup menu. See details here ("Moving files and folders" chapter).

When you changed the case of several file names, in other words you changed file names - they have become out of version control - that's why SVN client noticed that files that was under version control had disappeared (apparently, that happened because SVN client wasn't informed properly).

If you happened to be in this situation when IDE or you changed the case accidently - there is special menu option Repair move which appears when you select both files that are shown as "missing" and "non-versioned". Check this.

like image 89
pmod Avatar answered Sep 22 '22 00:09

pmod


I found that Tortoise SVN has a setting for auto fixing file name case changes. It is set to true by default, so if you only change the case of letters in the name then it will undo your changes for you... silently and ruthlessly I might add, very annoying default setting in my opinion.

Anyway luckily if you navigate to TortoiseSVN Settings->Advanced->FixCaseRenames you can change it to false and it will no longer auto correct case changes.Setting Location

like image 31
Lee Andy Cheneler Avatar answered Sep 23 '22 00:09

Lee Andy Cheneler