释放 SVN 存储库中的空间
我有一个托管在免费增值网站上的 SVN 存储库,具有最大存储库大小。当我接近这个容量时,我意识到我已经签入了一些文件,我知道我可以永久删除这些文件以释放磁盘空间。我如何告诉 SVN 一个文件不仅可以被删除,而且还可以是历史记录?
I have an SVN repository hosted on a freemium site with a maximum repository size. As I approach this capacity I am aware of files I've checked in that I know I can remove permanently to free up disk space. How do I tell SVN that a file can not only be deleted, but it's history as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不认为 subversion 中有一种方法可以告诉您不要对特定文件进行版本控制,或者至少在删除文件时忘记该文件。因为它违背了版本控制系统的目的。如果您有本地存储库,您将能够通过一些调整来实现这一目标。然而,如果没有存储库的任何管理员访问权限,就不可能做到这一点。
如果有帮助的话,rsvndump 是一个用于转储远程存储库的工具。这样您就可以将存储库转储到本地系统。要删除不需要的文件,可以使用此命令“cat xxx-svn-dump | svndumpfilter except $file > new-svn-dump”。尽管这样您可以减小存储库的大小,但您将无法使用此内容更新原始存储库。
I don't think there is a way in subversion to tell not to version a particular file or at least forget about a file when deleted. As it defeats the purpose of version control system. you will be able to achieve this by some tweaks if you have a local repository. However without any admin access for the repository, its going to be impossible to do this.
If it helps, rsvndump is a tool to take a dump of a remote repository. With this you will be able to get the repository dump to your local system. To remove the unwanted files you can use this command "cat xxx-svn-dump | svndumpfilter exclude $file > new-svn-dump". Although with this you can reduce the size of the repository, you will not be able to update the orginal repository with this content.
看看这个:
http://subversion.apache.org/faq.html#removal 说:
此SO答案中的可能解决方案:
从 SVN 历史记录中删除文件内容
Look at this:
http://subversion.apache.org/faq.html#removal says:
Possible solution in this SO answer:
Delete file contents from SVN history
您也可以修剪您的历史记录。假设你有 100 个修订,你可以保留最新的历史记录,比如说 50 个修订。这也可能会减少您的 Subversion 存储库的大小。
Also you can prune your history. Say you have 100 revisions, you can keep the latest history, say 50 revisions. This may also reduce the size of your subversion repository.