[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[f5a75ae] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[28320bf4] | 7 | <!ENTITY mercurial-download-http "https://www.mercurial-scm.org/release/mercurial-&mercurial-version;.tar.gz">
|
---|
[f5a75ae] | 8 | <!ENTITY mercurial-download-ftp " ">
|
---|
[dcfee652] | 9 | <!ENTITY mercurial-md5sum "f0c076d22c07bf65ffb02753fc516084">
|
---|
[ea781cd] | 10 | <!ENTITY mercurial-size "7.9 MB">
|
---|
[6f7082f6] | 11 | <!ENTITY mercurial-buildsize "113 MB (with docs, add 1.5 GB for tests)">
|
---|
| 12 | <!ENTITY mercurial-time "0.3 SBU (with docs; add 16 SBU for tests; both using parallelism=8)">
|
---|
[f5a75ae] | 13 | ]>
|
---|
| 14 |
|
---|
[263da2b] | 15 | <sect1 id="mercurial" xreflabel="Mercurial-&mercurial-version;">
|
---|
[f5a75ae] | 16 | <?dbhtml filename="mercurial.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
[263da2b] | 19 | <title>Mercurial-&mercurial-version;</title>
|
---|
[f5a75ae] | 20 |
|
---|
| 21 | <indexterm zone="mercurial">
|
---|
| 22 | <primary sortas="a-mercurial">mercurial</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to Mercurial</title>
|
---|
| 27 |
|
---|
[de33b2a] | 28 | <para>
|
---|
| 29 | <application>Mercurial</application> is a distributed source control
|
---|
| 30 | management tool similar to <application>Git</application> and
|
---|
| 31 | <application>Bazaar</application>. <application>Mercurial</application>
|
---|
| 32 | is written in <application>Python</application> and is used by projects
|
---|
[0f124fa] | 33 | such as Mozilla for Firefox and Thunderbird.
|
---|
[de33b2a] | 34 | </para>
|
---|
[f5a75ae] | 35 |
|
---|
[fc87c5a0] | 36 | &lfs122_checked;
|
---|
[f5a75ae] | 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
[de33b2a] | 41 | <para>
|
---|
| 42 | Download (HTTP): <ulink url="&mercurial-download-http;"/>
|
---|
| 43 | </para>
|
---|
[f5a75ae] | 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
[de33b2a] | 46 | <para>
|
---|
| 47 | Download (FTP): <ulink url="&mercurial-download-ftp;"/>
|
---|
| 48 | </para>
|
---|
[f5a75ae] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[de33b2a] | 51 | <para>
|
---|
| 52 | Download MD5 sum: &mercurial-md5sum;
|
---|
| 53 | </para>
|
---|
[f5a75ae] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[de33b2a] | 56 | <para>
|
---|
| 57 | Download size: &mercurial-size;
|
---|
| 58 | </para>
|
---|
[f5a75ae] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[de33b2a] | 61 | <para>
|
---|
| 62 | Estimated disk space required: &mercurial-buildsize;
|
---|
| 63 | </para>
|
---|
[f5a75ae] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[de33b2a] | 66 | <para>
|
---|
| 67 | Estimated build time: &mercurial-time;
|
---|
| 68 | </para>
|
---|
[f5a75ae] | 69 | </listitem>
|
---|
| 70 | </itemizedlist>
|
---|
| 71 |
|
---|
| 72 | <bridgehead renderas="sect3">Mercurial Dependencies</bridgehead>
|
---|
| 73 |
|
---|
| 74 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 75 | <para role="optional">
|
---|
[e972eb7] | 76 | <xref linkend="docutils"/>
|
---|
| 77 | (required to build the documentation),
|
---|
| 78 | <xref linkend="git"/>,
|
---|
| 79 | <xref linkend="gpgme"/> (with Python bindings),
|
---|
| 80 | <xref role="runtime" linkend="openssh"/>
|
---|
| 81 | (runtime, to access ssh://... repositories),
|
---|
| 82 | <xref linkend="pygments"/>,
|
---|
| 83 | <xref linkend="rust"/> (see <filename>rust/README.rst</filename> and <filename>rust/rhg/README.md</filename>),
|
---|
| 84 | <xref linkend="subversion"/> (with Python bindings),
|
---|
| 85 | <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
---|
| 86 | <ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
| 87 | <ulink url="https://pypi.python.org/pypi/pyflakes">pyflakes</ulink>,
|
---|
| 88 | <ulink url="https://www.pyopenssl.org/en/stable/">pyOpenSSL</ulink>, and
|
---|
| 89 | <ulink url="https://github.com/google/re2/">re2</ulink>
|
---|
[f5a75ae] | 90 | </para>
|
---|
| 91 |
|
---|
| 92 | </sect2>
|
---|
| 93 |
|
---|
| 94 | <sect2 role="installation">
|
---|
| 95 | <title>Installation of Mercurial</title>
|
---|
[d445316] | 96 | <!-- Rust port is now part of the standard tests -->
|
---|
| 97 |
|
---|
[de33b2a] | 98 | <para>
|
---|
| 99 | Build <application>Mercurial</application> by issuing the following
|
---|
| 100 | command:
|
---|
| 101 | </para>
|
---|
[0d7900a] | 102 |
|
---|
[f5a75ae] | 103 | <screen><userinput>make build</userinput></screen>
|
---|
[0d7900a] | 104 |
|
---|
[de33b2a] | 105 | <para>
|
---|
| 106 | To build the documentation (requires <xref linkend="docutils"/>), issue:
|
---|
| 107 | </para>
|
---|
[f5a75ae] | 108 |
|
---|
[d445316] | 109 | <screen remap="doc"><userinput>make doc</userinput></screen>
|
---|
[e972eb7] | 110 | <!--
|
---|
| 111 | The tests do not hang. Better to just report what failed.
|
---|
[6f7082f6] | 112 |
|
---|
| 113 | [renodr]: The tests do crash due to syntax errors and crash before they get
|
---|
| 114 | to the Python portion (which is where most of Mercurial is)
|
---|
| 115 | -->
|
---|
| 116 |
|
---|
[2ecc682] | 117 | <para>
|
---|
| 118 | If you wish to run the tests, the rust tests must be removed as they are
|
---|
| 119 | currently broken due to syntax errors. To do this, issue:
|
---|
| 120 | </para>
|
---|
| 121 |
|
---|
| 122 | <screen><userinput>sed -i '138,142d' Makefile</userinput></screen>
|
---|
[6f7082f6] | 123 |
|
---|
[c1ced74d] | 124 | <para>
|
---|
[f183c1c] | 125 | To run the test suite, issue:
|
---|
[c1ced74d] | 126 | </para>
|
---|
[634e2a1] | 127 | <screen remap="test"><userinput>TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp" make check</userinput></screen>
|
---|
[0f16c7cd] | 128 | <!-- The blacklists have to be checked every release of Mercurial, do a listing
|
---|
[e440af5] | 129 | of tests/blacklists, but do not include the README.
|
---|
[634e2a1] | 130 | For 6.4.1 removing the -blacklist entries did not affect the test results
|
---|
| 131 | although blacklists/fsmonitor and blacklists/linux-vfat still exist. -->
|
---|
[23209a71] | 132 |
|
---|
[de33b2a] | 133 | <para>
|
---|
| 134 | where <replaceable><N></replaceable> is an integer between one
|
---|
[e972eb7] | 135 | and the number of ( processor X threads ), inclusive. Tests may
|
---|
[634e2a1] | 136 | fail because some error messages have changed in Python or
|
---|
| 137 | some deprecation warnings are printed that were not present when the
|
---|
[e972eb7] | 138 | test was designed. Two tests are known to fail: test-duplicateoptions.py
|
---|
| 139 | and test-profile.t.
|
---|
| 140 | </para>
|
---|
[f183c1c] | 141 | <!--
|
---|
[f19b4b89] | 142 | # Ran 908 tests, 65 skipped, 4 failed. real 10m37.422s -bdubbs 6 Sep 22.
|
---|
| 143 | # Ran 881 tests,102 skipped, 23 failed. -plabs 17 Nov 22.
|
---|
| 144 | # Ran 919 tests, 64 skipped, 23 failed. real 10m25.285s -bdubbs 10 Jan 23.
|
---|
| 145 | # Ran 893 tests,101 skipped, 9 failed. real 29m03.014s -bdubbs 5 Mar 23.
|
---|
| 146 | # Ran 938 tests, 64 skipped, 8 failed. real 32m13.014s -bdubbs 17 Apr 23.
|
---|
| 147 | # Ran 935 tests, 69 skipped, 8 failed. real 26m15.875s -bdubbs 10 Jun 23.
|
---|
[a887a08] | 148 | # Ran 940 tests, 64 skipped, 8 failed. real omitted -bdubbs 26 Jun 23.
|
---|
[ea781cd] | 149 | # Ran 948 tests, 66 skipped, 0 failed. -pierre 12 Jul 23 (mercurial-6.5).
|
---|
[10c5df84] | 150 | # Ran 950 tests, 65 skipped, 1 failed. -pierre 8 Nov 23 (mercurial-6.5.3).
|
---|
[f300248] | 151 | # Ran 948 tests, 66 skipped, 0 failed. -renodr 22 Nov 23 (mercurial-6.6).
|
---|
[e972eb7] | 152 | # Ran 946 tests, 71 skipped, 2 failed. -bdubbs 20 Mar 24 (mercurial-6.7).
|
---|
[6f7082f6] | 153 | # Ran 966 tests, 58 skipped, 1 failed. -renodr 16 Mar 24 (mercurial-6.8).
|
---|
[1fe05eb] | 154 | -->
|
---|
[e972eb7] | 155 | <para>
|
---|
[1a7bbb8] | 156 | In order to
|
---|
[de33b2a] | 157 | investigate any apparently failing tests, you may use the
|
---|
| 158 | <command>run-tests.py</command> script. To see the almost forty switches,
|
---|
| 159 | some of them very useful, issue <command>tests/run-tests.py
|
---|
| 160 | --help</command>. Running the following commands, you will execute only
|
---|
| 161 | the tests that failed before:
|
---|
| 162 | </para>
|
---|
[f60ecce] | 163 |
|
---|
[a42c273] | 164 | <screen remap="test"><userinput>pushd tests &&
|
---|
[2beaab8] | 165 | rm -rf tmp &&
|
---|
[b93e2bde] | 166 | ./run-tests.py --tmpdir tmp test-gpg.t
|
---|
[768e6fd] | 167 | popd</userinput></screen>
|
---|
[f5a75ae] | 168 |
|
---|
[de33b2a] | 169 | <para>
|
---|
[6148e28] | 170 | Normally, the previous failures will be reproducible. However, if
|
---|
[de33b2a] | 171 | you add the switch <option>--debug</option> before
|
---|
[6148e28] | 172 | <option>--tmpdir</option>, and run the tests again, some failures may
|
---|
| 173 | disappear, which is a problem with the test suite. If this happens,
|
---|
| 174 | there will be no more of these failures even if you do not pass the
|
---|
| 175 | --debug switch again.
|
---|
[de33b2a] | 176 | </para>
|
---|
[2beaab8] | 177 |
|
---|
[de33b2a] | 178 | <para>
|
---|
[7a9a7b26] | 179 | An interesting switch is <option>--time</option>, which will generate a
|
---|
| 180 | table of all the executed tests and their respective start, end, user,
|
---|
[6148e28] | 181 | system and real times once the tests are complete. Note that these
|
---|
[de33b2a] | 182 | switches may be used with <command>make check</command> by including
|
---|
| 183 | them in the <envar>TESTFLAGS</envar> environment variable.
|
---|
| 184 | </para>
|
---|
[f60ecce] | 185 |
|
---|
[de33b2a] | 186 | <para>
|
---|
| 187 | Install <application>Mercurial</application> by running the following
|
---|
| 188 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 189 | </para>
|
---|
[f5a75ae] | 190 |
|
---|
| 191 | <screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
---|
| 192 |
|
---|
[de33b2a] | 193 | <para>
|
---|
| 194 | If you built the documentation, install it by running the following
|
---|
| 195 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 196 | </para>
|
---|
[f5a75ae] | 197 |
|
---|
[a42c273] | 198 | <screen role="root"
|
---|
| 199 | remap="doc"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
---|
[f5a75ae] | 200 |
|
---|
[de33b2a] | 201 | <para>
|
---|
[8558044] | 202 | After installation, two very quick and simple tests should run
|
---|
[de33b2a] | 203 | correctly. The first one needs some configuration:
|
---|
| 204 | </para>
|
---|
[ab0c555] | 205 |
|
---|
| 206 | <screen><userinput>cat >> ~/.hgrc << "EOF"
|
---|
| 207 | <literal>[ui]
|
---|
[2beaab8] | 208 | username = <replaceable><user_name> <user@mail></replaceable></literal>
|
---|
[ab0c555] | 209 | EOF</userinput></screen>
|
---|
| 210 |
|
---|
[de33b2a] | 211 | <para>
|
---|
| 212 | where you must replace <user_name> and <your@mail> (mail
|
---|
| 213 | is optional and can be omitted). With the user identity defined, run
|
---|
| 214 | <command>hg debuginstall</command> and several lines will be displayed,
|
---|
| 215 | the last one reading "no problems detected". Another quick and simple
|
---|
| 216 | test is just <command>hg</command>, which should output basic commands
|
---|
| 217 | that can be used with <command>hg</command>.
|
---|
| 218 | </para>
|
---|
[ab0c555] | 219 |
|
---|
[f5a75ae] | 220 | </sect2>
|
---|
| 221 |
|
---|
[d445316] | 222 | <!--
|
---|
[f0190231] | 223 | <sect2 role="commands">
|
---|
| 224 | <title>Command Explanations</title>
|
---|
| 225 |
|
---|
| 226 | <para>
|
---|
[586bd9ff] | 227 | <command>2to3 -w doc/hgmanpage.py</command>: Since <application>
|
---|
[f0190231] | 228 | Python 3</application> is used with docutils, one file needs to be
|
---|
| 229 | converted in order to be compatible.
|
---|
| 230 | </para>
|
---|
| 231 |
|
---|
[d445316] | 232 | </sect2>
|
---|
| 233 | -->
|
---|
[8558044] | 234 |
|
---|
[431b5b17] | 235 | <sect2 role="configuration">
|
---|
| 236 | <title>Configuring Mercurial</title>
|
---|
| 237 |
|
---|
| 238 | <sect3 id="mercurial-config">
|
---|
| 239 | <title>Config Files</title>
|
---|
| 240 |
|
---|
| 241 | <para>
|
---|
[28320bf4] | 242 | <filename>/etc/mercurial/hgrc</filename> and
|
---|
| 243 | <filename>~/.hgrc</filename>
|
---|
[431b5b17] | 244 | </para>
|
---|
| 245 |
|
---|
| 246 | <indexterm zone="mercurial mercurial-config">
|
---|
| 247 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 |
|
---|
[28320bf4] | 250 | <indexterm zone="mercurial mercurial-config">
|
---|
| 251 | <primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 |
|
---|
[de33b2a] | 254 | <para>
|
---|
| 255 | The great majority of extensions are disabled by default. Run
|
---|
| 256 | <command>hg help extensions</command> if you need to enable any, e.g.
|
---|
[6148e28] | 257 | when investigating test failures. This will output a list of enabled
|
---|
| 258 | and disabled extensions, as well as more information such as how to
|
---|
| 259 | enable or disable extensions using configuration files.
|
---|
[de33b2a] | 260 | </para>
|
---|
[28320bf4] | 261 |
|
---|
[de33b2a] | 262 | <para>
|
---|
| 263 | If you have installed <xref linkend="make-ca"/> and want
|
---|
[d761e0a] | 264 | <application>Mercurial</application> to use the certificates,
|
---|
| 265 | as the <systemitem class="username">root</systemitem> user, issue:
|
---|
[de33b2a] | 266 | </para>
|
---|
[431b5b17] | 267 |
|
---|
| 268 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
[a20c505f] | 269 | cat > /etc/mercurial/hgrc << "EOF"
|
---|
[431b5b17] | 270 | <literal>[web]
|
---|
[5c3f3856] | 271 | cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
|
---|
[431b5b17] | 272 | EOF</userinput></screen>
|
---|
| 273 |
|
---|
| 274 | </sect3>
|
---|
| 275 |
|
---|
| 276 | </sect2>
|
---|
| 277 |
|
---|
[f5a75ae] | 278 | <sect2 role="content">
|
---|
| 279 | <title>Contents</title>
|
---|
| 280 |
|
---|
| 281 | <segmentedlist>
|
---|
| 282 | <segtitle>Installed Programs</segtitle>
|
---|
| 283 | <segtitle>Installed Libraries</segtitle>
|
---|
| 284 | <segtitle>Installed Directories</segtitle>
|
---|
| 285 |
|
---|
| 286 | <seglistitem>
|
---|
[8ad9b196] | 287 | <seg>
|
---|
| 288 | hg
|
---|
| 289 | </seg>
|
---|
| 290 | <seg>
|
---|
| 291 | several internal modules under
|
---|
[d445316] | 292 | /usr/lib/python&python3-majorver;/site-packages/mercurial
|
---|
[8ad9b196] | 293 | </seg>
|
---|
| 294 | <seg>
|
---|
[f183c1c] | 295 | /etc/mercurial,
|
---|
| 296 | /usr/lib/python&python3-majorver;/site-packages/hgdemandimport,
|
---|
| 297 | /usr/lib/python&python3-majorver;/site-packages/hgext,
|
---|
| 298 | /usr/lib/python&python3-majorver;/site-packages/hgext3rd,
|
---|
| 299 | /usr/lib/python&python3-majorver;/site-packages/mercurial, and
|
---|
| 300 | /usr/lib/python&python3-majorver;/site-packages/mercurial-&mercurial-version;-py&python3-majorver;.egg-info
|
---|
[8ad9b196] | 301 | </seg>
|
---|
[f5a75ae] | 302 | </seglistitem>
|
---|
| 303 | </segmentedlist>
|
---|
| 304 |
|
---|
| 305 | <variablelist>
|
---|
| 306 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 307 | <?dbfo list-presentation="list"?>
|
---|
| 308 | <?dbhtml list-presentation="table"?>
|
---|
| 309 |
|
---|
| 310 | <varlistentry id="hg">
|
---|
| 311 | <term><command>hg</command></term>
|
---|
| 312 | <listitem>
|
---|
[de33b2a] | 313 | <para>
|
---|
[4c24eb0a] | 314 | is the mercurial version control system
|
---|
[de33b2a] | 315 | </para>
|
---|
[f5a75ae] | 316 | <indexterm zone="mercurial hg">
|
---|
| 317 | <primary sortas="b-hg">hg</primary>
|
---|
| 318 | </indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
| 321 |
|
---|
| 322 | </variablelist>
|
---|
| 323 |
|
---|
| 324 | </sect2>
|
---|
| 325 |
|
---|
| 326 | </sect1>
|
---|