Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Resharper 5.1 Refactor (Refactor->Move) Correctly Notify AnkhSVN/maintain SVN history?

My dev environment is Visual Studio 2010, with Resharper 5.1.3000.12 and AnkhSVN 2.1.10129.17 installed.

It's my understanding that Resharper should notify AnkhSVN (or VisualSVN, etc) when a Refactor->Move command is done on a file, to maintain the SVN history on the file. However, when I do such a refactor through the Solution Explorer in Visual Studio, AnkhSVN treats the file move as a delete/add, thus losing the SVN history for that file. In fact, Ankh doesn't even add the new version of the file, it just deletes the old one, and I have to manually "add" the new one before I can commit.

HOWEVER, if I do a Ctl-X,Ctl-V through the Solution Explorer to move the file, Ankh detects it as a copy/move and maintains the history, auto-adds the new file, and generally behaves as one would expect.

Does this work for anyone else, and if so, did you have to do anything tricky to get it to work? Have I missed a setting somewhere to wire up AnkhSVN with Resharper, do I perhaps need new versions of either plugin, or perhaps this is some kind of installation order problem? (I installed Resharper first, then Ankh).

like image 878
Egahn Avatar asked Sep 13 '11 20:09

Egahn


2 Answers

A certain amount of work has been done during ReSharper 6 release cycle to make sure that ReSharper's Move refactorings resulted in VCS moving them instead of deleting and adding new files.

However, as there has been no comprehensive QA for this piece of functionality, it has not been announced as a part of ReSharper 6 set of improvements.

In other words, there's no guarantee that ReSharper 6 will behave better in your scenario but it's worth a try upgrading.

like image 179
Jura Gorohovsky Avatar answered Nov 10 '22 00:11

Jura Gorohovsky


Accordingly to the Jetbrains task tracker, it's still not fixed. You may track it here: http://youtrack.jetbrains.com/issue/RSRP-179384.

Issue is related to TFS but it's also reproducible with AnkhSvn in VS Professional 2012. ReSharper version: 7.1.1 C# Edition (Build 7.1.1000.900)

like image 33
wunderbar Avatar answered Nov 09 '22 22:11

wunderbar