Benjol
Benjol

Reputation: 66531

SVN deleting renamed/repaired file

Scenario in VS2012, with VisualSVN.

I know that SVN doesn't like not being the master of rename, but what's going wrong here?

enter image description here

Upvotes: 3

Views: 244

Answers (1)

bahrep
bahrep

Reputation: 30662

  1. It seems to be a bug in TortoiseSVN. I've just reported it to dev@ TortoiseSVN mailing-list. The bug has been just fixed. Thanks to Stefan Kung.

  2. You don't need to run "Repair move" command on files that were properly renamed or moved. VisualSVN tracks all file operations performed in Visual Studio and reflects them to Subversion. Moves, adds, renames, etc -- these are all covered by VisualSVN plug-in.

Here is a quote from TortoiseSVN manual linked to your question:

Sometimes your friendly IDE will rename files for you as part of a refactoring exercise, and of course it doesn't tell Subversion.

VisualSVN actually tells Subversion that there was a rename, therefore you don't need to run "Repair move" when using VisualSVN.

Just try to rename a file in some testing Visual Studio solution using VisualSVN and check svn status to see what happened. For example, here is the result you'll see:

D       WindowsFormsApplication3\Program.cs
        > moved to WindowsFormsApplication3\SUPERPROGRAM.cs
A  +    WindowsFormsApplication3\SUPERPROGRAM.cs
        > moved from WindowsFormsApplication3\Program.cs

As you can see, the file has been properly renamed.

And here is the repository log entry for the rename after you commit the change:

r3 | Pavel.Lyalyakin | 2015-04-22 13:46:38 +0300 (Wed, 22 Apr 2015) | 1 line
Changed paths:
   D /trunk/WindowsFormsApplication3/Program.cs
   A /trunk/WindowsFormsApplication3/SUPERPROGRAM.cs (from /trunk/WindowsFormsApplication3/Program.cs:2)

As you can see, there is a note that the file SUPERPROGRAM.cs was renamed from Program.cs in revision 2.

Upvotes: 1

Related Questions