gpt4 book ai didi

svn - 是否可以从 svn 存储库中删除文件?

转载 作者:行者123 更新时间:2023-12-03 07:07:34 24 4
gpt4 key购买 nike

当文件从 svn 存储库中删除时, checkout 旧版本的用户仍然可以访问它们。这显然是源代码控制的巨大优势之一。

是否可以从存储库中删除文件?我知道这会损害包含该文件的过去修订的完整性。

例如,专有代码可能会无意中提交到开源项目的公共(public) svn 存储库。 是否有任何受支持的方法将其从存储库中删除,以便即使通过回顾过去的修订也无法检索它?

最佳答案

http://subversion.tigris.org/faq.html#removal

There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.

The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)

In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.

关于svn - 是否可以从 svn 存储库中删除文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1908391/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com