减少 Mercurial 中的存储库大小 [英] Reducing repository size in Mercurial

查看:14
本文介绍了减少 Mercurial 中的存储库大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的团队使用 Mercurial 存储库中的源代码处理给定项目时,存储库的大小显然在增长.因此,通过网络克隆存储库变得越来越慢.

As my team works on a given project with the source in a Mercurial repository, the repository is obviously growing in size. As such, cloning a repository over the network becomes slower and slower.

是否有任何技术可用于删除较旧的提交或减小存储库的大小以使克隆操作在慢速网络上更快?

Are there any techniques that are used for pruning out older commits or reducing the size of the repo to make the cloning operation faster over a slow network?

(我们使用 TortoiseHg 作为 Mercurial 客户端,但(我猜)不应该对这个问题的解决方案产生影响.)

(We are using TortoiseHg as the Mercurial client but that (I'm guessing) shouldn't make a difference to the solution to this problem.)

推荐答案

一种选择是 使用 convert 扩展将您的存储库分解为一组较小的存储库.

One option is to use the convert extension to decompose your repository to a group of smaller repositories.

假设您有一个已演变为包含许多项目(文件夹)的存储库.你已经决定如果每个项目(文件夹)都是一个单独的存储库,你会更好.您可以使用 convert 扩展来做到这一点并保留您的变更集历史记录.

Say you have a repository that has evolved to contain many projects (folders). And you have decided you’d be better off if each project (folder) were a separate repository. You can use the convert extension to do just that and retain your changeset history.

这篇关于减少 Mercurial 中的存储库大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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