Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reducing repository size in Mercurial

Tags:

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.)

like image 500
Guy Avatar asked Apr 15 '11 23:04

Guy


2 Answers

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.

like image 130
Matt Ball Avatar answered Nov 15 '22 11:11

Matt Ball


You can use a dedicated clone of the remote repo on your computer as a cache for clone operations. So you don't need to transfer the whole repo over the net every time, but only the parts which are not already there.

like image 27
Rudi Avatar answered Nov 15 '22 13:11

Rudi