Getting mozilla-central with limited bandwidth
Thursday, June 5th, 2008Recently we opened up mozilla-central for checkins for Mozilla 1.9.1/Firefox.Next. As people on IRC have started using the repository, one of the major complaints has been that cloning the entire repository for the first time can take a very long time over a slow network… and for flaky networks, it may be impossible to clone at all.
There is a solution: instead of cloning directly from hg.mozilla.org (hg clone http://hg.mozilla.org/mozilla-central/), download a changeset bundle and unbundle it to create a local repository.
- Download a mozilla-central bundle. For the moment, I’m hosting one here. I’m going to ask the mozilla release team to produce one nightly and host it on the mozilla FTP server. The bundle file is approximately 65MB.
- Create a new, empty repository:
$ hg init mozilla-central
- Un-bundle the real mozilla-central changes to that repository:
$ cd mozilla-central; $ hg unbundle /path/to/mozilla-central.bundle
- Tell mercurial where you normally want to pull from by copying the following content into your mozilla-central/.hg/hgrc file:
[paths] default = http://hg.mozilla.org/mozilla-central/
- Pull any additional changes that happened since the bundle was created:
$ hg pull
- Update your working directory to the latest change:
$ hg up
Happy hacking!