Resharper 5.1 重构(重构->移动)是否正确通知 AnkhSVN/维护 SVN 历史记录?
我的开发环境是 Visual Studio 2010,安装了 Resharper 5.1.3000.12 和 AnkhSVN 2.1.10129.17。
据我了解,当对文件执行 Refactor->Move 命令时,Resharper 应该通知 AnkhSVN(或 VisualSVN 等),以维护文件上的 SVN 历史记录。但是,当我通过 Visual Studio 中的解决方案资源管理器进行此类重构时,AnkhSVN 将文件移动视为删除/添加,从而丢失该文件的 SVN 历史记录。事实上,Ankh 甚至不添加文件的新版本,它只是删除旧版本,我必须手动“添加”新版本才能提交。
但是,如果我通过解决方案资源管理器执行 Ctl-X、Ctl-V 来移动文件,Ankh 会将其检测为复制/移动并维护历史记录,自动添加新文件,并且通常表现得与预期一致。
这对其他人有用吗?如果是,您是否需要做一些棘手的事情才能让它发挥作用?我是否错过了将 AnkhSVN 与 Resharper 连接的设置,我是否需要任一插件的新版本,或者这可能是某种安装顺序问题? (我先安装了 Resharper,然后安装了 Ankh)。
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 ReSharper 6 发布周期中已完成一定量的工作,以确保 ReSharper 的 Move 重构导致 VCS 移动它们,而不是删除和添加新文件。
然而,由于这项功能尚未进行全面的 QA,因此尚未将其作为 ReSharper 6 改进集的一部分进行公布。
换句话说,无法保证 ReSharper 6 在您的场景中表现更好,但值得尝试升级。
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.
据 Jetbrains 任务跟踪器称,该问题仍未修复。您可以在此处跟踪:http://youtrack.jetbrains.com/issue/RSRP-179384。
问题与 TFS 有关,但也可以在 VS Professional 2012 中使用 AnkhSvn 重现。
ReSharper 版本:7.1.1 C# 版(内部版本 7.1.1000.900)
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)