Mozilla Source Code (Mercurial)
From MDC
Mercurial is a source-code management tool which allows users to keep track of changes to the source code locally and share their changes with others. The Mozilla project is in transition from using CVS for Firefox 3/Mozilla 1.9 development to Mercurial for Firefox 4/Mozilla 2 development.
Contents |
[edit] Client Settings
[edit] Mercurial Configuration
You should configure Mercurial before pulling the code. At a minimum, your mercurial configuration file should have the following settings:
[ui] username = Your Real Name <user@example.com> [diff] git = 1
On Windows, these settings can be added to C:\Program Files\Mercurial\Mercurial.ini. On unix-like systems, they should be in your $HOME/.hgrc file.
[edit] Autoconf 2.13
Mozilla 2 sources do not come with a generated configure script. You will need to have autoconf version 2.13 installed:
- On Mac:
- sudo port install autoconf213
- On Fedora/RedHat Linux:
- sudo yum install autoconf213
- On Ubuntu Linux:
- sudo apt-get install autoconf2.13
- On Windows:
- autoconf 2.13 comes with MozillaBuild
[edit] Checking out a Source Tree
# Pull the main Mozilla sources first hg clone http://hg.mozilla.org/mozilla-central/ src cd src # Use a script to pull other required sources: This includes NSPR, NSS, and Tamarin python client.py checkout
[edit] Building
Configure and build as usual using a .mozconfig file and make -f client.mk.
# Generate a mozconfig yourself, or use this minimal default one echo '. $topsrcdir/browser/config/mozconfig' > .mozconfig # configure will be automatically generated using the 'autoconf-2.13' # command. If autoconf-2.13 isn't the right name for your system, as # is the case on OS X using MacPorts, use the real command name as # demonstrated below. echo 'mk_add_options AUTOCONF=autoconf213' >> .mozconfig # Now do the build; configure will be run automatically make -f client.mk build
[edit] See Also
- The Mercurial page has information about creating diffs, committing changes, and publishing shared repositories.