释放 SVN 存储库中的空间

发布于 2024-09-26 01:20:27 字数 121 浏览 2 评论 0原文

我有一个托管在免费增值网站上的 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 技术交流群。

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

发布评论

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

评论(3

冬天的雪花 2024-10-03 01:20:27

我不认为 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.

玩心态 2024-10-03 01:20:27

看看这个:

http://subversion.apache.org/faq.html#removal 说:

在某些特殊情况下,您
可能想销毁所有证据
文件或提交。 (也许有人
不小心犯了机密
文件。)这并不容易,因为
Subversion 是故意设计的
永远不会丢失信息。修订内容为
建立在一棵树之上的不可变树
其他。从中删除修订
历史会造成多米诺骨牌效应,
造成后续一切混乱
修订并可能无效
所有工作副本。

此SO答案中的可能解决方案:

从 SVN 历史记录中删除文件内容

Look at this:

http://subversion.apache.org/faq.html#removal says:

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.

Possible solution in this SO answer:

Delete file contents from SVN history

删除→记忆 2024-10-03 01:20:27

您也可以修剪您的历史记录。假设你有 100 个修订,你可以保留最新的历史记录,比如说 50 个修订。这也可能会减少您的 Subversion 存储库的大小。

svnadmin dump /path/to/current/repo -r50:100 > newsvn.dump
# you can delete the old repo and then
svnadmin create /path/to/new/repo
svnadmin load /path/to/new/repo < newsvn.dump

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.

svnadmin dump /path/to/current/repo -r50:100 > newsvn.dump
# you can delete the old repo and then
svnadmin create /path/to/new/repo
svnadmin load /path/to/new/repo < newsvn.dump
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文