如何阻止 SVN Checkout 恢复从项目中删除的文件?
我们是 subversion、tortoisesvn、ankhsvn 堆栈的新手。 虽然在 Studio 2008 中我们从项目中删除了文件,但问题是当我们在 CI 构建中执行 svn checkout 时,我们会得到已删除的文件。 如何防止这些文件包含在结帐中?
提前致谢。
We are new to the subversion, tortoisesvn, ankhsvn stack. While in Studio 2008 we have deleted files from our project problem is when we do an svn checkout in our CI build we get the deleted files. How do I prevent these files from being included in the checkout?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要在 Subversion 中删除它们。 从 TortoiseSVN 菜单中,选择“删除”,然后提交该删除。 在命令行上,您可以使用 svn rm,然后提交。
You need to delete them in Subversion. From the TortoiseSVN menu, chose "Delete", then commit that deletion. On the command line, you can use
svn rm <filename>
, and then commit.确保您已完成 SVN 删除(通过 VS 删除文件时 Ankh 应该提供此选项,或者您可以在资源管理器中使用 Tortoise 手动执行此操作)。 一旦您提交了该更改,该文件将不会成为 SVN 中头修订的一部分。
Make sure you've done an SVN delete (Ankh should offer this option when deleting files through VS, or you can do it manually using Tortoise in Explorer). Once you've committed that change, the file will not be part of the head revision in SVN.
在 Visual Studio 中,“删除”和“删除”之间存在差异。 在 C# 项目中按“del”键时,删除是默认操作; 在 C++ 项目中,默认值为“删除”。
如果发生删除事件,AnkhSVN 不会 svn 删除该文件,因为如果没有安装 AnkhSVN,VS 也不会从磁盘中删除它。
In Visual Studio there's a difference between 'Remove' and 'Delete'. Delete is the default action when you press the 'del' key when in a C# project; in a C++ project the default is 'Remove'.
In case of a remove event, AnkhSVN doesn't svn delete the file, because without AnkhSVN installed, VS wouldn't remove it from disk either.
仅从项目中删除文件是不够的:SVN 对“项目”一无所知,它只知道工作副本中的文件,因此您必须从资源管理器中“物理”删除这些文件,然后提交更改。
Deleting files from project only is not enough: SVN doesn't know a thing about "projects", all it knows about are files in your working copy, so you have to delete these "physically" from within the Explorer and then commit changes.