mozilla

Revision 67715 of Mercurial

  • Revision slug: Mercurial
  • Revision title: Mercurial
  • Revision id: 67715
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment add Installing section (move from [[Mercurial FAQ]] and [[Mozilla Source Code (Mercurial)]])

Revision Content

Mercurial is the distributed version control software we're using for {{mediawiki.interwiki('wikimo', 'Mozilla_2', 'Mozilla 2')}} development. It will replace CVS after Mozilla 1.9 is released.

hg is the Mercurial command-line tool, Hg being the chemical symbol for the element mercury.

Installing

If you use apt-get, emerge, port, or yum to install software, just do the usual. If this gives you an old version (pre-1.0 -- check with hg version), you can update it using easy_install as follows (using apt-get in this example):

sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial

Otherwise, the Mercurial binary packages are for you. See also {{mediawiki.interwiki('wikimo', 'Mercurial_on_Windows', 'wikimo:Mercurial on Windows')}}.

After installing, choose a merge program. Seriously. Do it now. If you don't, Mercurial will choose one for you and spring it on you when you least expect it.

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 <tt>C:\Program Files\Mercurial\Mercurial.ini</tt>. On UNIX-like systems, they should be in your <tt>$HOME/.hgrc</tt> file.

Learning to use Mercurial

First, read every word of Mercurial basics, before you do anything else.

Then, the Mercurial FAQ is a decent place to start.

See Mozilla Source Code (Mercurial) for getting a tree to build.

Further reading

The hg book is the definitive Mercurial user guide.

Category:Mercurial lists the Mercurial-related articles on MDC.

And on wiki.mozilla.org, these helpful pages:

  • {{mediawiki.interwiki('wikimo', 'Using_Mercurial_locally_with_CVS', 'Using Mercurial locally with CVS')}}, a how-to. (Note that this is only useful for code that's still exclusively in CVS.)
  • {{mediawiki.interwiki('wikimo', 'Mercurial_on_Windows', 'Mercurial on Windows')}}
{{ wiki.languages( { "fr": "fr/Mercurial", "ja": "ja/Mercurial" } ) }}

Revision Source

<p><b>Mercurial</b> is the <a class="external" href="http://blog.ianbicking.org/distributed-vs-centralized-scm.html">distributed version control software</a> we're using for {{mediawiki.interwiki('wikimo', 'Mozilla_2', 'Mozilla 2')}} development.  It will replace CVS after Mozilla 1.9 is released.
</p><p><b><code>hg</code></b> is the Mercurial command-line tool, Hg being the chemical symbol for the element mercury.
</p>
<h2 name="Installing"> Installing </h2>
<p>If you use <code>apt-get</code>, <code>emerge</code>, <code>port</code>, or <code>yum</code> to install software, just do the usual.  If this gives you an old version (pre-1.0 -- check with <code>hg version</code>), you can update it using <code>easy_install</code> as follows (using <code>apt-get</code> in this example):
</p>
<pre class="eval">sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial
</pre>
<p>Otherwise, the <a class="external" href="http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages">Mercurial binary packages</a> are for you.  See also {{mediawiki.interwiki('wikimo', 'Mercurial_on_Windows', 'wikimo:Mercurial on Windows')}}.
</p><p>After installing, <b>choose a <a class="external" href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram">merge program</a></b>.  Seriously.  Do it now.  If you don't, Mercurial will choose one for you and spring it on you when you least expect it.
</p><p>You should configure Mercurial before pulling the code. At a minimum, your mercurial configuration file should have the following settings:
</p>
<pre class="eval">[ui]
username = Your Real Name &lt;user@example.com&gt;

[diff]
git = 1
</pre>
<p>On Windows, these settings can be added to <tt>C:\Program Files\Mercurial\Mercurial.ini</tt>. On UNIX-like systems, they should be in your <tt>$HOME/.hgrc</tt> file.
</p>
<h2 name="Learning_to_use_Mercurial"> Learning to use Mercurial </h2>
<p>First, read every word of <a href="en/Mercurial_basics">Mercurial basics</a>, before you do anything else.
</p><p>Then, the <a href="en/Mercurial_FAQ">Mercurial FAQ</a> is a decent place to start.
</p><p>See <a href="en/Mozilla_Source_Code_(Mercurial)">Mozilla Source Code (Mercurial)</a> for getting a tree to build.
</p>
<h2 name="Further_reading"> Further reading </h2>
<p>The <a class="external" href="http://hgbook.red-bean.com/hgbook.html">hg book</a> is the definitive Mercurial user guide.
</p><p><a href="Special:Tags?tag=Mercurial&amp;language=en">Category:Mercurial</a> lists the Mercurial-related articles on MDC.
</p><p>And on wiki.mozilla.org, these helpful pages:
</p>
<ul><li> {{mediawiki.interwiki('wikimo', 'Using_Mercurial_locally_with_CVS', 'Using Mercurial locally with CVS')}}, a how-to.  (Note that this is only useful for code that's still exclusively in CVS.)
</li><li> {{mediawiki.interwiki('wikimo', 'Mercurial_on_Windows', 'Mercurial on Windows')}}
</li></ul>
{{ wiki.languages( { "fr": "fr/Mercurial", "ja": "ja/Mercurial" } ) }}
Revert to this revision