Search code examples
mercurialcontinuous-integrationtortoisehgfilesizemaven-release-plugin

Reducing repository size in 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?

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


Solution

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

    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.