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.

  1. 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.
  2. Create a new, empty repository:
    $ hg init mozilla-central
  3. Un-bundle the real mozilla-central changes to that repository:
    $ cd mozilla-central;
    $ hg unbundle /path/to/mozilla-central.bundle
  4. 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/
  5. Pull any additional changes that happened since the bundle was created:
    $ hg pull
  6. Update your working directory to the latest change:
    $ hg up

    Happy hacking!

Atom Feed for Comments 5 Responses to “Getting mozilla-central with limited bandwidth”

  1. Gary Kwong Says:

    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.

  2. Mossop Says:

    Whatever happened to getting one produced nightly?

  3. The Rumbling Edge :: Amaya, Mercurial m-c & c-c bundles, and Ubiquity commands Says:

    [...] 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 [...]

  4. Gerry Healy Says:

    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.

  5. NGUYEN Manh Hung Says:

    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

Leave a Reply