mozilla

Revision 101119 of Getting comm-central Source Code Using Mercurial

  • Revision slug: Developer_Guide/Source_Code/Getting_comm-central
  • Revision title: Getting comm-central Source Code Using Mercurial
  • Revision id: 101119
  • Created:
  • Creator: Tonymec
  • Is current revision? No
  • Comment 58 words added, 19 words removed

Revision Content

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 Mozilla 1.9 development to Mercurial for Mozilla 1.9.1 development and onwards.

If you want to build Thunderbird 2.0, SeaMonkey 1.1 or older versions, use CVS.

Client Settings

The settings are the same as for the core Firefox 3.5/xulrunner 1.9.1 development. See

Mozilla_Source_Code_(Mercurial)#Client_settings.

Getting comm-central source code

Branches

comm-central has various different branches available. Current possibilities are:

For more information on these branches, see the comm-central page.

Initial checkout

The Thunderbird, SeaMonkey, Lightning and Sunbird source code is contained in several different repositories. The main integration repository for those applications is comm-central and contains the main code that is required on to of the core Gecko code. It also contains a script, client.py, which is used to get the other code.

To get one of the comm-central repositories ("clone" the repository, using Mercurial terminology), do the following, replacing <location of repository> with one of the http urls from the branches section above, according to what you want to build:

# Pull the Mozilla source to the folder src/ - may take a while 
# as hundreds of megabytes of history is downloaded to .hg
hg clone <location of repository> src

cd src
If you already have a mozilla-central tree, you can at this stage clone it to src/mozilla to avoid pulling all of mozilla-central again.

Update/pull all other needed sources using client.py:

python client.py checkout
  • If you get the error message "No module named subprocess", install python 2.4 or later.
  • This step will download hundreds of megabytes of data. This can take a while, depending on your network connection.

client.py performs the following tasks:

  • Pulls the comm-central codebase.
  • Pulls the mozilla-central codebase into mozilla/
  • Pulls the following repositories into mozilla/extensions/ :
    • irc (Chatzilla)
    • inspector (DOM Inspector)
    • venkman (JavaScript Debugger)
  • Pulls the LDAP SDK codebase into ldap/sdks/
    • (Except on recent trunk — December 2010 — this is done by CVS and the destination is mozilla/directory/c-sdk instead)
  • Runs a 'hg update' after each of the above hg pulls to update the corresponding repository clone's working directory contents. This is not required (in fact, you may prefer to pull manually). Pass --skip-comm to client.py to skip this.
Pulling in the related repositories means that you can use the same source directories to develop and build any of the items mentioned above, but does not mean that you can create cross-repository change sets. Patches that span repositories will require multiple changesets.

Updating the Repository

To update the repository, just run client.py again:

python client.py checkout

Building

For the comm-central apps, see the following links:

Firefox and xulrunner

You can, if needed, build Firefox or xulrunner from this tree. As client.py pulls the mozilla-central repository, builds and development of Firefox and xulrunner can take place within a repository from comm-central. The only difference is that you will need to go into the mozilla/ directory before running the build command:

cd src/mozilla
make -f client.mk build

See Also

{{ languages( { "fr": "fr/Code_source_de_comm-central_(Mercurial)", "ja": "ja/Developer_Guide/Source_Code/Getting_comm-central_Source_Code_Using_Mercurial" } ) }}

Revision Source

<p><a href="/en/Mercurial" title="en/Mercurial">Mercurial</a> 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 <a href="/En/Developer_Guide/Source_Code/CVS" title="Getting Older Mozilla Source Code Using CVS">CVS</a> for Mozilla 1.9 development to Mercurial for Mozilla 1.9.1 development and onwards.</p>
<div class="note">If you want to build Thunderbird 2.0, SeaMonkey 1.1 or older versions, use <a href="/En/Developer_Guide/Source_Code/CVS" title="Getting Older Mozilla Source Code Using CVS">CVS</a>.</div>
<h3>Client Settings</h3>
<p>The settings are the same as for the core Firefox 3.5/xulrunner 1.9.1 development. See</p>
<p><a href="/En/Developer_Guide/Source_Code/Mercurial#Client_settings" title="en/Mozilla_Source_Code_(Mercurial)#Client_settings">Mozilla_Source_Code_(Mercurial)#Client_settings</a>.</p>
<h3 name="Checking_out_a_source_tree">Getting comm-central source code</h3>
<h4>Branches</h4>
<p><a href="/en/comm-central" title="en/comm-central">comm-central</a> has various <a href="/en/comm-central#Branches" title="en/comm-central#Branches">different branches</a> available. Current possibilities are:</p>
<ul> <li><code><a class=" external" href="http://hg.mozilla.org/comm-central/" rel="freelink">http://hg.mozilla.org/comm-central/</a></code> (trunk builds of Thunderbird, SeaMonkey and Sunbird)</li> <li><code><a class=" external" href="http://hg.mozilla.org/releases/comm-1.9.1/" rel="freelink">http://hg.mozilla.org/releases/comm-1.9.1/</a></code> (Thunderbird 3.0, SeaMonkey 2.0, Sunbird 1.0)</li> <li><code><a class=" external" href="http://hg.mozilla.org/releases/comm-1.9.2/" rel="freelink">http://hg.mozilla.org/releases/comm-1.9.2/</a></code> (Thunderbird 3.1)</li>
</ul>
<p>For more information on these branches, see the <a href="/en/comm-central" title="en/comm-central">comm-central</a> page.</p>
<h4>Initial checkout</h4>
<p>The Thunderbird, SeaMonkey, Lightning and Sunbird source code is contained in several different repositories. The main integration repository for those applications is <a href="/en/comm-central" title="en/comm-central"> comm-central</a> and contains the main code that is required on to of the core Gecko code. It also contains a script, <code>client.py</code>, which is used to get the other code.</p>
<p>To get one of the comm-central repositories ("clone" the repository, using Mercurial terminology), do the following, replacing <code>&lt;location of repository&gt;</code> with one of the http urls from the <a href="/En/Developer_Guide/Source_Code/Getting_comm-central#Branches" title="En/Developer Guide/Source Code/Getting comm-central#Branches">branches</a> section above, according to what you want to build:</p>
<pre class="eval"># Pull the Mozilla source to the folder src/ - may take a while 
# as hundreds of megabytes of history is downloaded to .hg
hg clone &lt;location of repository&gt; src

cd src
</pre>
<div class="note">If you already have a mozilla-central tree, you can at this stage clone it to src/mozilla to avoid pulling all of mozilla-central again.</div>
<p>Update/pull all other needed sources using client.py:</p>
<pre class="eval">python client.py checkout
</pre>
<div class="note">
<ul> <li>If you get the error message "No module named subprocess", install python 2.4 or later.</li> <li>This step will download hundreds of megabytes of data. This can take a while, depending on your network connection.</li>
</ul>
</div>
<p>client.py performs the following tasks:</p>
<ul> <li>Pulls the comm-central codebase.</li> <li>Pulls the <a href="/en/mozilla-central" title="en/mozilla-central">mozilla-central</a> codebase into mozilla/</li> <li>Pulls the following repositories into mozilla/extensions/ : <ul> <li>irc (Chatzilla)</li> <li>inspector (DOM Inspector)</li> <li>venkman (JavaScript Debugger)</li> </ul> </li> <li>Pulls the LDAP SDK codebase into ldap/sdks/ <ul> <li><em>(Except on recent trunk — December 2010 — this is done by CVS and the destination is </em>mozilla/directory/c-sdk<em> instead)</em></li> </ul> </li> <li>Runs a 'hg update' after each of the above <strong>hg pull</strong>s to update the corresponding repository clone's working directory contents. This is not required (in fact, you may prefer to pull manually). Pass --skip-comm to client.py to skip this.</li>
</ul>
<div class="note">Pulling in the related repositories means that you can use the same source directories to develop and build any of the items mentioned above, but does not mean that you can create cross-repository change sets. Patches that span repositories will require multiple changesets.</div>
<h4>Updating the Repository</h4>
<p>To update the repository, just run client.py again:</p>
<pre>python client.py checkout
</pre>
<h3 name="Building">Building</h3>
<p>For the comm-central apps, see the following links:</p>
<ul> <li><a class="internal" href="/en/Simple_Thunderbird_build" title="en/Simple Thunderbird build">Simple Thunderbird Build</a></li> <li><a class="internal" href="/en/Simple_SeaMonkey_build" title="en/Simple SeaMonkey build">Simple SeaMonkey Build</a></li> <li><a class="internal" href="/en/Simple_Sunbird_build" title="en/Simple Sunbird build">Simple Sunbird Build</a></li>
</ul>
<h4 name="Firefox_and_xulrunner">Firefox and xulrunner</h4>
<p>You can, if needed, build Firefox or xulrunner from this tree. As client.py pulls the mozilla-central repository, builds and development of Firefox and xulrunner can take place within a repository from comm-central. The only difference is that you will need to go into the mozilla/ directory before running the build command:</p>
<pre class="eval">cd src/mozilla
make -f client.mk build
</pre>
<h3 name="See_Also">See Also</h3>
<ul> <li><a href="/en/comm-central" title="en/comm-central">comm-central</a></li> <li><a href="/en/Mercurial" title="en/Mercurial">Mercurial</a></li> <li><a href="/en/Mercurial_FAQ" title="en/Mercurial_FAQ">Mercurial FAQ</a></li> <li><a href="/En/Developer_Guide/Source_Code/Mercurial" title="en/Mozilla_Source_Code_(Mercurial)">Mozilla_Source_Code_(Mercurial)</a></li>
</ul>
<p>{{ languages( { "fr": "fr/Code_source_de_comm-central_(Mercurial)", "ja": "ja/Developer_Guide/Source_Code/Getting_comm-central_Source_Code_Using_Mercurial" } ) }}</p>
Revert to this revision