[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: BUG: FixCaseRenames happens too early?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 15 Oct 2015 20:14:09 +0200

On 15.10.2015 14:36, Antony Bartlett wrote:
> Tested using Windows 8.1 and TortoiseSVN 1.9.2, Build 26806 - 64 Bit.
> 1. (Ensure FixCaseRenames is set to true. Right-click->TortioseSVN->Settings->Advanced)
> 2. Add files called 'MyTest.txt' and 'MyTest2.txt' to your workspace and commit them.
> 3. Edit both files.
> 4. Bring up the commit dialog.
> 5. Rename 'MyTest.txt' to be called 'mytest.txt'.
> 6. OK the commit dialog.
> BUG: Commit proceeds but only the second of the two files is committed.
> EXPECTED: Both files to be committed. (alternatively, it would be acceptable for the commit to fail with an appropriate error message).
> Note that the appropriate FixCaseRenames do happen, but when the commit dialog is brought up, and not when OK is pressed. i.e. switch steps 4 & 5 and the problem goes away.
> The broader context within which I've been caught out by this issue twice (and a co-working once) in a two-week period may also be of interest:
> 1. In Visual Studio Resource Editor we use an existing control (e.g. IDC_EDIT_EXISTING) to create a new control via copy and paste. The new control is called IDC_EDIT_EXISTING2 so we quickly rename it to what we wanted to call it (IDC_EDIT_NEW_THING).
> 2. We save, compile, and do whatever else is required in order to work on this revision.
> 3. We bring up the commit dialog and inspect our changes.
> 4. We notice there are two new #defines in resource.h, IDC_EDIT_EXISTING2 and IDC_EDIT_NEW_THING, so we go back to Visual Studio and manually remove the unwanted IDC_EDIT_EXISTING2 #define. We save and check it compiles, without realizing an unwanted change of case has happened to the filename 'resource.h'/'Resource.h'.
> 5. We commit our work and go home.
> 6. The continuous-build system starts spitting out 'undefined keyword or key name: IDC_EDIT_NEW_THING' errors for that and every subsequent revision, but because the original developer isn't around, it is a long time before anyone does anything about it.
> Thanks for taking an interest in this rather tedious issue - in an age in which many developers have second monitors I'm surprised I haven't been able to find an existing bug report about this.

The case-fix is done when the commit dialog is started because if it
would be done later, the commit dialog would show the wrong info: it
would show the file that has the case wrong as missing. And that's very
confusing for users.

Also, it is never a good idea to leave the commit dialog open and edit
files while it is open. The commit dialog does monitor the file system
for changes while it is open to avoid committing files that are not even
shown (yet). But in this case this won't help.

But in your case, to fix this problem for good:
open the resource.rc file in an editor, search for "resource.h" and
adjust the case. Then remove the "resource.h" file from the solution
explorer, and add it back with the correct case.
After that, your 'Resource.h' file won't change the case every time
you're editing it.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-10-15 20:14:24 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.