I am using Visual Studio for editing source code and once a while I switch to Windows Explorer to commit changes with TortoiseSVN. This procedure works well for me and I am quite happy with it. However, recently I started to rename classes and reorganize namespaces a lot. I like to rename and move files in Visual Studio because it automatically update the project file for me. When I commit changes, however, I have to tell TortoiseSVN that old files were deleted and new files were added, which isn't quite true and it breaks the history of the particular code.
So my question is: When I rename file in Visual Studio, is there any way to tell TortoiseSVN that I did that to preserve file history?
Update (16:30): Ankhsvn seems to be obvious answer but I like thing as they are now. It sounds weird but I like TortoiseSVN not being integrated in Visual Studio. This is maybe because of my two monitor setup when I have always opened file manager on my secondary monitor. Maybe because I found Solution Explorer a little clunky. Maybe because I like to think about code editing and revision control as separate steps of software development. I don't know.
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.
If you want to do a simple in-place rename of a file or folder, use Context Menu → Rename... Enter the new name for the item and you're done.
If you have a newer version of TSVN (after 1.5.0, I think), you can use the "repair moves" feature. I use it all the time for situations just like that.
Have a look at http://ankhsvn.open.collab.net/. It looks for these things and handles the changes appropriately and shows you directly in the Solution Explorer what has changed. Plus, you don't have to go back to Explorer! I really like it a lot!
There is no reason to prevent file history. That is the whole point of a source code control system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With