我的 Mercurial 存储库太大,我需要删除旧的提交。是否可以?
我在 Google 代码托管上有一个大型 Mercurial 存储库,如何删除旧的提交/修订?我不再需要旧的修订版,因为我已将其分叉到其他存储库。
I have a big Mercurial Repository on Google Code Hosting, how can I delete the old commits/revisions? I don't need that old revisions anymore because I have forked it to other repositories.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想说,删除修订版本是版本控制的一大禁忌:-)
不过,您可以使用
hg Convert
选项来转换为具有更改修订版本的新存储库。据我所知,使用 splicemap,您可以删除修订。但它对 Google 存储库没有帮助,因为它保持原样。您必须删除它(按照 Klaim 的描述进行重置)并推送转换后的存储库。
您还可以将转换后的存储库推送到另一位置(默认存储库除外),因为在一个项目中,Google Code 上最多可能有 7 个存储库。
I would say that deleting revisions is anathema to version control :-)
Nevertheless, you might use the
hg convert
options to convert to a new repo with changed revisions. AFAIK using splicemap, you could remove revisions.But it won't help with the Google repository, because it stays as it is. You will have to delete it (reset as described by Klaim) and push the converted repository.
You can also push the converted repository to another place (other then default repo) because you may have up to 7 repositories on Google Code in one project.
进入“管理”选项卡,然后单击要从中删除修订的存储库上的“重置”,然后按照说明进行操作,具体取决于您最终想要执行的操作。
Go in the Administer tab, then click on Reset on the repository you want to delete revisions from, then follow the instructions, depending on what exactly you wanted to do in the end.