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

2

5

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).

Deflower answered 13/9, 2011 at 20:18 Comment(2)
I did notice that Resharper 6 has been released... if anybody has anecdotal evidence that this solves the problem, I think I'm allowed to upgrade for free to that version. Not sure if that will help with this issue or not.Deflower
I've see other StackOverflow questions about this: #2426573 and https://mcmap.net/q/854206/-resharper-and-tortoisesvn, which indicate that this should work, but it doesn't seem to.Deflower
G
7

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.

Gladis answered 13/9, 2011 at 21:3 Comment(4)
Thanks for the quick reply gorohoroh... if I end up upgrading to Resharper 6 and that fixes the problem, I'll mark this as the answer.Deflower
Resharper 6 fixed the problem!! Thanks for the suggestion, gorohoroh. You might consider adding this to the list of fixes for that version! =)Deflower
@Deflower Many thanks for verifying this! I think, however, we should investigate more use cases before we announce anything.Gladis
Can someone using Resharper 6 let me know if this also works with "Move to another file to match type name"? If Resharper 6 does a copy, rename, and then fill, this will work, and I can makea much stronger case for our NEED. :-) Now to find an HG provider that handles Move and Copies, since VisualHG isn't it.Thumb
M
1

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)

Moulmein answered 31/5, 2013 at 11:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.