Did you ever rename a file from inside Visual Studio? Did you ever move a file from one folder to another from inside Visual Studio? I think you did.

And what happened when you tried to commit your changes to a SVN repository with Tortoise SVN?

You probably got this:

Tortoise doesn't recognize the two files as one

Here I moved a file named MonitoringControllerTest.cs file from the root to the Controller folder: Tortoise SVN didn’t recognize the file as just moved, but instead it found a new file in the Controller folder, and a missing file in the root folder.

If you want Tortoise to understand “moves” you have to do it from the File Explorer, dragging the file to the destination folder with the secondary mouse button while holding the Shift key. But this is annoying because you always have to move back and forth between Visual Studio and Explorer.

A few days ago I found this feature, maybe I was the only one in the world not aware of it: Repair Move.

If, from inside the commit dialog, you select the two files that are supposed to be the same, and right click on them, you will find this new menu command: Repair Move.

Repair Move command in the contextual menu

When you click on it, Tortoise SVN will recognize the two files as a move operation instead of a new file and a delete, and the commit dialog will show it in the way it shows moved files (a delete and an added +).

Risultato

The same command also fixes rename operations.

I don’t know since how long this feature is available, but if I had found it out before, this would have saved me quite a few time.

Another option would have been adding something like VisualSVN or AnkhSVN that will automatically marks moves (together with a lot of other things). But I don’t like the integrated SVN clients.