如何在 Subversion 中修剪旧版本? [英] How do I prune old revisions in Subversion?

查看:22
本文介绍了如何在 Subversion 中修剪旧版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从我的开发 Subversion 存储库中删除旧版本?我保留了一个 subversion 沙箱,其中有很多测试项目、二进制文件等.我想偶尔修剪历史记录.

How can I prune old revisions from my development subversion repository? I keep a subversion sandbox in which I have lots of test projects, binaries, etc. I'd like to prune the history occasionally.

推荐答案

官方答复如下:

在某些特殊情况下,您可能希望销毁文件或提交的所有证据.(也许有人不小心提交了一份机密文件.)这并不容易,因为 Subversion 是故意设计成永远不会丢失信息的.修订是不可变的树,它们相互建立.从历史中删除修订会导致多米诺骨牌效应,在所有后续修订中造成混乱,并可能使所有工作副本失效.

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.

然而,该项目计划有朝一日实施一个 svnadmin 删除命令,该命令将完成永久删除信息的任务.(见第 516 期.)

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

与此同时,您唯一的办法是 svnadmin 转储您的存储库,然后通过 svndumpfilter(不包括坏路径)将转储文件通过管道传输到 svnadmin 加载命令中.有关这方面的详细信息,请参阅 Subversion 手册的第 5 章.

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.

在这里找到:http://subversion.tigris.org/faq.html#removal

这篇关于如何在 Subversion 中修剪旧版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆