SVN delete renamed / restored file

Script in VS2012 with VisualSVN.

  • Right click rename file (using VS Solution explorer)
  • Hacking in a few hours
  • Right click the commit project
  • Right click and restore before / after file versions
  • The "error" field indicates that "the file was not found"
  • And yes, that's right, the new version of my file is gone.
  • (Expletives deleted)

I know SVN doesn't like being a rename master, but what is wrong here?

enter image description here

+3


source to share


1 answer


  • This seems to be a bug in TortoiseSVN. I just reported this on the dev @TortoiseSVN mailing list . Bug fixed. Thanks to Stefan Kung .

  • You do not need to run the Rebuild Traverse command on files that have been renamed or renamed. VisualSVN tracks all file operations performed in Visual Studio and reflects them to Subversion. Moves, adds, renames, etc. - they are all covered by the VisualSVN plugin.

Here is a quote from the TortoiseSVN manual related to your question:

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

VisualSVN actually tells Subversion to rename, so when using VisualSVN you don't need to run Revert Traverse.

Just try renaming the file in some testing of your Visual Studio solution with VisualSVN and check svn status

to see what happened. For example, here's the output 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 renamed correctly.

And here is the repository log entry for renaming after committing 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 SUPERPROGRAM.cs file was renamed from Program.cs in version 2.

+1


source







All Articles