为什么 svn checkout 包含已从存储库中删除的文件?

发布于 2024-11-08 18:16:31 字数 388 浏览 0 评论 0原文

我在 Linux 机器上有一个存储库,当我通过 TortoiseSVN 浏览存储库时,我可以看到某些文件夹已从存储库中删除(它们应该是这样),但是当我执行新的“svn checkout”(到新的文件夹),它尝试在 Linux 机器上检索那些已删除的文件。

为什么 SVN 会检索这些已删除的文件,我怎样才能告诉它不要这样做?

我看到了这个类似的问题,但它没有解决我的问题:

如何阻止 SVN Checkout 恢复从项目中删除的文件?

I have a repo on a Linux box and when I browse the repo via TortoiseSVN I can see that certain folders have been deleted from the repo (as they should be), and yet when I do a fresh "svn checkout" (to a new folder) on the Linux box it attempts to retrieve those deleted files.

Why is SVN retrieving these deleted files, and how can I tell it not to do so?

I saw this similar question but it doesn't address my problem:

How do you stop SVN Checkout from bringing back files that were deleted from the project?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

但可醉心 2024-11-15 18:16:31

SVN 恢复已删除文件的原因只有几个。

  1. 该文件已在分支中删除,并且您从仍包含该文件的另一个分支检出。
  2. 该文件在当前的“HEAD”修订版中被删除,并且您正在检出该文件曾经存在的较旧修订版(在这种情况下,当您 svn update 到已删除的修订版时,该文件将消失)。
  3. 发出了“svn delete ...”命令,但您无法使用“svn commit ...”将删除提交回 SVN 树。

大多数情况下,#3 会导致混乱,因为 SVN 删除并不意味着自动提交(因此您可以将删除与其他更改结合起来)。

There are only a few reasons SVN will restore a file that's been deleted.

  1. The file was deleted in a branch, and you checkout from a different branch which still contains the file.
  2. The file was deleted in the current "HEAD" revision, and you are checking out an older revision where the file used to exist (when you svn update to the deleted revision under this scenario, the file will disappear).
  3. The "svn delete ..." command was issued, but you failed to commit the deletion back to the SVN tree with "svn commit ...".

Most of the time it's #3 that causes the confusion, as a SVN delete doesn't imply an automatic commit (so you can couple a delete with other changes).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文