清理 Subversion 存储库的最佳方法是什么? [英] What's the best way to clean up a Subversion repository?

查看:40
本文介绍了清理 Subversion 存储库的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个不断增长的存储库,其中包含我使用 TortoiseSVN 维护的十几个项目(因为我对此完全陌生,还不知道来龙去脉).我必须保存存储库的空间有限,所以我想备份它,然后删除一些旧版本.例如,如果一个项目的版本是 50,我只想保留 50、49、48.

I have a growing repository containing a dozen or so projects that I maintain using TortoiseSVN (as I am completely new to this and don't know the ins and outs yet). The space I have to hold the repository is limited so I want to back it up, then remove some of the older versions. For example, if a project is at version 50, I want to keep only 50,49,48.

推荐答案

删除旧的修订有点违背版本控制的意义,但你可以直接转储你想要保留的修订,然后把它们放到一个新的仓库中,并删除旧的.

Removing old revisions kind of defeats the point of version control, but you can just dump out the revisions you want to keep, then put them into a new repo, and delete the old one.

svnadmin dump /path/to/current/repo -r48:50 > svn.dump
svnadmin create /path/to/new/repo
svnadmin load /path/to/new/repo < svn.dump

或者使用svndumpfilter 包含/排除您想要的特定位等.在 svn 常见问题解答中还有一些关于 删除,您可能会觉得有用.

Or use svndumpfilter to include/exclude the particular bits you want, etc. There also some info in the svn FAQs about removal that you may find useful.

这篇关于清理 Subversion 存储库的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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