2024-01-20 05:35:53 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2012-04-22 19:54:18 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2016-02-03 04:07:17 +08:00
|
|
|
<!ENTITY mercurial-download-http "https://www.mercurial-scm.org/release/mercurial-&mercurial-version;.tar.gz">
|
2012-04-22 19:54:18 +08:00
|
|
|
<!ENTITY mercurial-download-ftp " ">
|
2024-01-18 06:08:27 +08:00
|
|
|
<!ENTITY mercurial-md5sum "f79602d5bc2d3c4db6fda4738d4d6a25">
|
2023-07-13 04:59:12 +08:00
|
|
|
<!ENTITY mercurial-size "7.9 MB">
|
2023-11-23 10:22:55 +08:00
|
|
|
<!ENTITY mercurial-buildsize "115 MB (with docs, add 1.5 GB for tests)">
|
2024-01-18 06:08:27 +08:00
|
|
|
<!ENTITY mercurial-time "0.3 SBU (with docs; add 14 SBU for tests; both using parallelism=8)">
|
2012-04-22 19:54:18 +08:00
|
|
|
]>
|
|
|
|
|
2013-07-19 04:21:39 +08:00
|
|
|
<sect1 id="mercurial" xreflabel="Mercurial-&mercurial-version;">
|
2012-04-22 19:54:18 +08:00
|
|
|
<?dbhtml filename="mercurial.html"?>
|
|
|
|
|
|
|
|
|
2013-07-19 04:21:39 +08:00
|
|
|
<title>Mercurial-&mercurial-version;</title>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
|
|
|
<indexterm zone="mercurial">
|
|
|
|
<primary sortas="a-mercurial">mercurial</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to Mercurial</title>
|
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
<application>Mercurial</application> is a distributed source control
|
|
|
|
management tool similar to <application>Git</application> and
|
|
|
|
<application>Bazaar</application>. <application>Mercurial</application>
|
|
|
|
is written in <application>Python</application> and is used by projects
|
2021-06-17 03:57:04 +08:00
|
|
|
such as Mozilla for Firefox and Thunderbird.
|
2020-03-12 17:24:44 +08:00
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2023-08-18 01:39:01 +08:00
|
|
|
&lfs120_checked;
|
2012-04-22 19:54:18 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&mercurial-download-http;"/>
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&mercurial-download-ftp;"/>
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &mercurial-md5sum;
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Download size: &mercurial-size;
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &mercurial-buildsize;
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &mercurial-time;
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Mercurial Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
2017-11-19 06:17:57 +08:00
|
|
|
<xref linkend="docutils"/>
|
|
|
|
(required to build the documentation),
|
2012-09-06 07:11:23 +08:00
|
|
|
<xref linkend="git"/>,
|
2021-10-18 05:17:20 +08:00
|
|
|
<xref linkend="gpgme"/> (with Python bindings),
|
2017-09-16 03:46:45 +08:00
|
|
|
<xref role="runtime" linkend="openssh"/>
|
|
|
|
(runtime, to access ssh://... repositories),
|
2019-05-12 23:02:34 +08:00
|
|
|
<xref linkend="pygments"/>,
|
2022-01-23 10:56:48 +08:00
|
|
|
<xref linkend="rust"/> (see <filename>rust/README.rst</filename> and <filename>rust/rhg/README.md</filename>),
|
2012-09-06 07:11:23 +08:00
|
|
|
<xref linkend="subversion"/> (with Python bindings),
|
2014-12-24 02:12:52 +08:00
|
|
|
<ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
2022-09-08 15:34:19 +08:00
|
|
|
<ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
|
2021-10-18 05:17:20 +08:00
|
|
|
<ulink url="https://pypi.python.org/pypi/pyflakes">pyflakes</ulink>,
|
|
|
|
<ulink url="https://www.pyopenssl.org/en/stable/">pyOpenSSL</ulink>, and
|
|
|
|
<ulink url="https://github.com/google/re2/">re2</ulink>
|
2012-09-06 07:11:23 +08:00
|
|
|
|
2012-04-22 19:54:18 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Mercurial</title>
|
2020-05-03 10:20:59 +08:00
|
|
|
<!-- Rust port is now part of the standard tests -->
|
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Build <application>Mercurial</application> by issuing the following
|
|
|
|
command:
|
|
|
|
</para>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2012-04-22 19:54:18 +08:00
|
|
|
<screen><userinput>make build</userinput></screen>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
To build the documentation (requires <xref linkend="docutils"/>), issue:
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2020-05-03 10:20:59 +08:00
|
|
|
<screen remap="doc"><userinput>make doc</userinput></screen>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2023-03-27 12:20:24 +08:00
|
|
|
<para>
|
|
|
|
If you wish to run the tests, the rust tests must be removed as they are
|
|
|
|
currently broken due to syntax errors. To do this, issue:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>sed -i '138,142d' Makefile</userinput></screen>
|
|
|
|
|
2016-05-19 23:32:44 +08:00
|
|
|
<para>
|
2022-11-17 20:12:26 +08:00
|
|
|
To run the test suite, issue:
|
2016-05-19 23:32:44 +08:00
|
|
|
</para>
|
2023-04-18 06:37:39 +08:00
|
|
|
<screen remap="test"><userinput>TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp" make check</userinput></screen>
|
2019-07-11 06:13:15 +08:00
|
|
|
<!-- The blacklists have to be checked every release of Mercurial, do a listing
|
2023-08-27 16:04:08 +08:00
|
|
|
of tests/blacklists, but do not include the README.
|
2023-04-18 06:37:39 +08:00
|
|
|
For 6.4.1 removing the -blacklist entries did not affect the test results
|
|
|
|
although blacklists/fsmonitor and blacklists/linux-vfat still exist. -->
|
2014-07-03 09:56:50 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
where <replaceable><N></replaceable> is an integer between one
|
2022-11-17 20:12:26 +08:00
|
|
|
and the number of ( processor X threads ), inclusive. Several tests
|
2023-04-18 06:37:39 +08:00
|
|
|
fail because some error messages have changed in Python or
|
|
|
|
some deprecation warnings are printed that were not present when the
|
2022-09-07 04:23:14 +08:00
|
|
|
test was designed.
|
2022-11-17 20:12:26 +08:00
|
|
|
<!--
|
2023-06-11 06:06:46 +08:00
|
|
|
# Ran 908 tests, 65 skipped, 4 failed. real 10m37.422s -bdubbs 6 Sep 22.
|
|
|
|
# Ran 881 tests,102 skipped, 23 failed. -plabs 17 Nov 22.
|
|
|
|
# Ran 919 tests, 64 skipped, 23 failed. real 10m25.285s -bdubbs 10 Jan 23.
|
|
|
|
# Ran 893 tests,101 skipped, 9 failed. real 29m03.014s -bdubbs 5 Mar 23.
|
|
|
|
# Ran 938 tests, 64 skipped, 8 failed. real 32m13.014s -bdubbs 17 Apr 23.
|
|
|
|
# Ran 935 tests, 69 skipped, 8 failed. real 26m15.875s -bdubbs 10 Jun 23.
|
2023-06-27 04:17:04 +08:00
|
|
|
# Ran 940 tests, 64 skipped, 8 failed. real omitted -bdubbs 26 Jun 23.
|
2023-07-13 04:59:12 +08:00
|
|
|
# Ran 948 tests, 66 skipped, 0 failed. -pierre 12 Jul 23 (mercurial-6.5).
|
2023-11-09 01:03:05 +08:00
|
|
|
# Ran 950 tests, 65 skipped, 1 failed. -pierre 8 Nov 23 (mercurial-6.5.3).
|
2023-11-23 10:22:55 +08:00
|
|
|
# Ran 948 tests, 66 skipped, 0 failed. -renodr 22 Nov 23 (mercurial-6.6).
|
2022-09-11 23:31:48 +08:00
|
|
|
-->
|
2022-09-07 04:23:14 +08:00
|
|
|
In order to
|
2020-03-12 17:24:44 +08:00
|
|
|
investigate any apparently failing tests, you may use the
|
|
|
|
<command>run-tests.py</command> script. To see the almost forty switches,
|
|
|
|
some of them very useful, issue <command>tests/run-tests.py
|
|
|
|
--help</command>. Running the following commands, you will execute only
|
|
|
|
the tests that failed before:
|
|
|
|
</para>
|
2017-08-11 09:09:05 +08:00
|
|
|
|
2019-05-21 20:39:37 +08:00
|
|
|
<screen remap="test"><userinput>pushd tests &&
|
2016-02-04 01:22:58 +08:00
|
|
|
rm -rf tmp &&
|
2017-10-07 10:35:56 +08:00
|
|
|
./run-tests.py --tmpdir tmp test-gpg.t
|
2014-10-05 22:19:41 +08:00
|
|
|
popd</userinput></screen>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
2022-03-06 12:20:11 +08:00
|
|
|
Normally, the previous failures will be reproducible. However, if
|
2020-03-12 17:24:44 +08:00
|
|
|
you add the switch <option>--debug</option> before
|
2022-03-06 12:20:11 +08:00
|
|
|
<option>--tmpdir</option>, and run the tests again, some failures may
|
|
|
|
disappear, which is a problem with the test suite. If this happens,
|
|
|
|
there will be no more of these failures even if you do not pass the
|
|
|
|
--debug switch again.
|
2020-03-12 17:24:44 +08:00
|
|
|
</para>
|
2016-02-04 01:22:58 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
2022-04-20 21:36:11 +08:00
|
|
|
An interesting switch is <option>--time</option>, which will generate a
|
|
|
|
table of all the executed tests and their respective start, end, user,
|
2022-03-06 12:20:11 +08:00
|
|
|
system and real times once the tests are complete. Note that these
|
2020-03-12 17:24:44 +08:00
|
|
|
switches may be used with <command>make check</command> by including
|
|
|
|
them in the <envar>TESTFLAGS</envar> environment variable.
|
|
|
|
</para>
|
2017-08-11 09:09:05 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
Install <application>Mercurial</application> by running the following
|
|
|
|
command (as <systemitem class="username">root</systemitem>):
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
If you built the documentation, install it by running the following
|
|
|
|
command (as <systemitem class="username">root</systemitem>):
|
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2019-05-21 20:39:37 +08:00
|
|
|
<screen role="root"
|
|
|
|
remap="doc"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
2012-04-22 19:54:18 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
2021-09-07 01:42:49 +08:00
|
|
|
After installation, two very quick and simple tests should run
|
2020-03-12 17:24:44 +08:00
|
|
|
correctly. The first one needs some configuration:
|
|
|
|
</para>
|
2014-01-08 07:19:09 +08:00
|
|
|
|
|
|
|
<screen><userinput>cat >> ~/.hgrc << "EOF"
|
|
|
|
<literal>[ui]
|
2016-02-04 01:22:58 +08:00
|
|
|
username = <replaceable><user_name> <user@mail></replaceable></literal>
|
2014-01-08 07:19:09 +08:00
|
|
|
EOF</userinput></screen>
|
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
where you must replace <user_name> and <your@mail> (mail
|
|
|
|
is optional and can be omitted). With the user identity defined, run
|
|
|
|
<command>hg debuginstall</command> and several lines will be displayed,
|
|
|
|
the last one reading "no problems detected". Another quick and simple
|
|
|
|
test is just <command>hg</command>, which should output basic commands
|
|
|
|
that can be used with <command>hg</command>.
|
|
|
|
</para>
|
2014-01-08 07:19:09 +08:00
|
|
|
|
2012-04-22 19:54:18 +08:00
|
|
|
</sect2>
|
|
|
|
|
2020-05-03 10:20:59 +08:00
|
|
|
<!--
|
2019-01-12 22:57:16 +08:00
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
|
|
|
<para>
|
2019-12-07 08:34:39 +08:00
|
|
|
<command>2to3 -w doc/hgmanpage.py</command>: Since <application>
|
2019-01-12 22:57:16 +08:00
|
|
|
Python 3</application> is used with docutils, one file needs to be
|
|
|
|
converted in order to be compatible.
|
|
|
|
</para>
|
|
|
|
|
2020-05-03 10:20:59 +08:00
|
|
|
</sect2>
|
|
|
|
-->
|
2021-09-07 01:42:49 +08:00
|
|
|
|
2013-06-17 18:21:02 +08:00
|
|
|
<sect2 role="configuration">
|
|
|
|
<title>Configuring Mercurial</title>
|
|
|
|
|
|
|
|
<sect3 id="mercurial-config">
|
|
|
|
<title>Config Files</title>
|
|
|
|
|
|
|
|
<para>
|
2016-02-03 04:07:17 +08:00
|
|
|
<filename>/etc/mercurial/hgrc</filename> and
|
|
|
|
<filename>~/.hgrc</filename>
|
2013-06-17 18:21:02 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<indexterm zone="mercurial mercurial-config">
|
|
|
|
<primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2016-02-03 04:07:17 +08:00
|
|
|
<indexterm zone="mercurial mercurial-config">
|
|
|
|
<primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
The great majority of extensions are disabled by default. Run
|
|
|
|
<command>hg help extensions</command> if you need to enable any, e.g.
|
2022-03-06 12:20:11 +08:00
|
|
|
when investigating test failures. This will output a list of enabled
|
|
|
|
and disabled extensions, as well as more information such as how to
|
|
|
|
enable or disable extensions using configuration files.
|
2020-03-12 17:24:44 +08:00
|
|
|
</para>
|
2016-02-03 04:07:17 +08:00
|
|
|
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
|
|
|
If you have installed <xref linkend="make-ca"/> and want
|
2021-09-08 23:47:33 +08:00
|
|
|
<application>Mercurial</application> to use the certificates,
|
|
|
|
as the <systemitem class="username">root</systemitem> user, issue:
|
2020-03-12 17:24:44 +08:00
|
|
|
</para>
|
2013-06-17 18:21:02 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
2017-08-11 18:39:18 +08:00
|
|
|
cat > /etc/mercurial/hgrc << "EOF"
|
2013-06-17 18:21:02 +08:00
|
|
|
<literal>[web]
|
2018-12-02 10:50:58 +08:00
|
|
|
cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
|
2013-06-17 18:21:02 +08:00
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2012-04-22 19:54:18 +08:00
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2014-11-17 01:03:58 +08:00
|
|
|
<seg>
|
|
|
|
hg
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
several internal modules under
|
2020-05-03 10:20:59 +08:00
|
|
|
/usr/lib/python&python3-majorver;/site-packages/mercurial
|
2014-11-17 01:03:58 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
2022-11-17 20:12:26 +08:00
|
|
|
/etc/mercurial,
|
|
|
|
/usr/lib/python&python3-majorver;/site-packages/hgdemandimport,
|
|
|
|
/usr/lib/python&python3-majorver;/site-packages/hgext,
|
|
|
|
/usr/lib/python&python3-majorver;/site-packages/hgext3rd,
|
|
|
|
/usr/lib/python&python3-majorver;/site-packages/mercurial, and
|
|
|
|
/usr/lib/python&python3-majorver;/site-packages/mercurial-&mercurial-version;-py&python3-majorver;.egg-info
|
2014-11-17 01:03:58 +08:00
|
|
|
</seg>
|
2012-04-22 19:54:18 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="hg">
|
|
|
|
<term><command>hg</command></term>
|
|
|
|
<listitem>
|
2020-03-12 17:24:44 +08:00
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the mercurial version control system
|
2020-03-12 17:24:44 +08:00
|
|
|
</para>
|
2012-04-22 19:54:18 +08:00
|
|
|
<indexterm zone="mercurial hg">
|
|
|
|
<primary sortas="b-hg">hg</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|