我有很多项目的 ac# 解决方案。其中一个位于与项目名称不匹配的文件夹中(出于我不知道的原因,因为做这件事的人在我到达之前就离开了)。我心爱的 ReSharper 插件对我脾气暴躁,在命名空间声明下画了蓝色的波浪线,并抱怨道:“命名空间与文件位置不对应,应该是……”我同意。但文件位置错误,而不是命名空间错误。
如何在不破坏 subversion 集成之类的情况下更改项目的文件夹名称?我正在使用 AnkhSvn 插件,但也安装了 TortoiseSVN,只要解决方案保持理智,使用起来都会很舒服。
有什么建议吗?
I have a c# solution with a bunch of projects. One of them resides in a folder that does not match the project name (for reasons I can't know since the guy who did it left before I arrived). My beloved ReSharper plugin goes all grumpy on me and draws blue swiggly lines under the namespace declarations and groans: "Namespace does not correspond to file location, should be..." And I agree. But the file location is wrong, not the namespace.
How can do I change the folder name of the project without breaking subversion integration and whatnot? I'm using the AnkhSvn pluging, but also have TortoiseSVN installed and would be comfortable to use either as long as the solution stays sane.
Any tips?
发布评论
评论(2)
只需重命名该文件夹即可。这应该适用于除仅案例更改之外的所有情况,AnkhSVN 将处理这项艰巨的工作。
对于最后一个类别,您可以重命名为不同的名称,提交...更新所有工作副本(例如等待一天)..然后重命名为最终名称。 (Subversion 不支持仅大小写重命名)
看起来 Subversion 1.7 将支持仅大小写重命名,但需要一些时间才能发布。
Just rename the folder. This should work in all cases except for case-only changes and AnkhSVN will handle the hard work.
For this last category you can rename to a different name, commit... update all working copies (e.g. wait a day).. and then rename to the final name. (Case only renames are not supported by Subversion)
It looks like Subversion 1.7 will support case only renames, but it will take some time for that to be released.
在 TortoiseSVN 中,您有一个移动版本化项目的功能。如果使用鼠标右键将文件夹拖动到要移动它的位置,则在放置该文件夹时您将看到一个菜单,其中包含使用 SVN 移动或导出方法的多个选项。然后 SVN 将控制正在发生的事情。
编辑:
在您的情况下,您可能只想使用右键单击重命名文件夹:TortoiseSVN->重命名...
In TortoiseSVN you have a function to move versioned items. If you drag the folder using the right mouse button to the location where you want to move it, you will get a menu when you drop it with several options using SVN methods of moving or exporting it. Then SVN will have control on what's happening.
Edit:
In your case, you might just want to rename the folder using Right click: TortoiseSVN->Rename...