Getting mozilla-central with limited bandwidth
Recently 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!
June 5th, 2008 at 2:25 pm
If I’m not wrong, I occasionally combine steps 5 and 6 to get |hg pull -u| instead. It does a pull and updates at the same time.
August 14th, 2008 at 5:19 am
Whatever happened to getting one produced nightly?
August 30th, 2008 at 3:12 pm
[...] internet connection. No matter how long you try, it does not seem to finish, so I resorted to Benjamin Smedberg’s bundle file that saved me lots of [...]
November 10th, 2008 at 2:24 am
Thanks for this, worked like a charm.
I’m living in Nepal at the moment and one of the biggest frustrations is the less than reliable internet access, let alone the speed. I’m hoping to submit some patches to Thunderbird that will make it a little more usable as an IMAP client under these conditions.
November 22nd, 2008 at 1:41 pm
Until last week, I could still manage to bundle the repository and unbundle it successfully.
But today, after updating the repository, it doesn’t work anymore! I could still bundle the repository, but when I unbundled it: eventhough the terminal output didn’t give out any errors, the directory was empty. There were some .i files in the .hg folder, and nothing else.
I have been retrying for several times. The unbundle action still works well on the old repository, but not on the new repository.
However, I could build installers/langpack successfully on the new repository.
So, I wonder if Mozilla has done something to the hg tree? Do you have any ideas about this? And what should I do to fix this?
Thanks in advance,
NGUYEN Manh Hung
(Vietnamese Localization Team).
Thanks