[f5a75ae] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 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 " ">
|
---|
[8bfa135f] | 9 | <!ENTITY mercurial-md5sum "7f5b32b013bb86c1eef7741e383416b2">
|
---|
[2ecc682] | 10 | <!ENTITY mercurial-size "7.8 MB">
|
---|
[634e2a1] | 11 | <!ENTITY mercurial-buildsize "80 MB (with docs, add 2.2 GB for tests)">
|
---|
[8bfa135f] | 12 | <!ENTITY mercurial-time "0.3 SBU (with docs; add 18 SBU for tests; both using parallelism=4)">
|
---|
[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 |
|
---|
[dc1a45e] | 36 | &lfs113_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">
|
---|
[d3ea9e8] | 76 | <xref linkend="docutils"/>
|
---|
| 77 | (required to build the documentation),
|
---|
[982e5c9] | 78 | <xref linkend="git"/>,
|
---|
[169d04a] | 79 | <xref linkend="gpgme"/> (with Python bindings),
|
---|
[572553b] | 80 | <xref role="runtime" linkend="openssh"/>
|
---|
| 81 | (runtime, to access ssh://... repositories),
|
---|
[07f61e4] | 82 | <xref linkend="pygments"/>,
|
---|
[d0e51e6] | 83 | <xref linkend="rust"/> (see <filename>rust/README.rst</filename> and <filename>rust/rhg/README.md</filename>),
|
---|
[982e5c9] | 84 | <xref linkend="subversion"/> (with Python bindings),
|
---|
[b2b0d26] | 85 | <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
---|
[80106051] | 86 | <ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
[169d04a] | 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>
|
---|
[982e5c9] | 90 |
|
---|
[f5a75ae] | 91 | </para>
|
---|
| 92 |
|
---|
| 93 | <para condition="html" role="usernotes">User Notes:
|
---|
| 94 | <ulink url="&blfs-wiki;/mercurial"/></para>
|
---|
| 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 | <sect2 role="installation">
|
---|
| 99 | <title>Installation of Mercurial</title>
|
---|
[d445316] | 100 | <!-- Rust port is now part of the standard tests -->
|
---|
| 101 |
|
---|
[de33b2a] | 102 | <para>
|
---|
| 103 | Build <application>Mercurial</application> by issuing the following
|
---|
| 104 | command:
|
---|
| 105 | </para>
|
---|
[0d7900a] | 106 |
|
---|
[f5a75ae] | 107 | <screen><userinput>make build</userinput></screen>
|
---|
[0d7900a] | 108 |
|
---|
[de33b2a] | 109 | <para>
|
---|
| 110 | To build the documentation (requires <xref linkend="docutils"/>), issue:
|
---|
| 111 | </para>
|
---|
[f5a75ae] | 112 |
|
---|
[d445316] | 113 | <screen remap="doc"><userinput>make doc</userinput></screen>
|
---|
[f5a75ae] | 114 |
|
---|
[2ecc682] | 115 | <para>
|
---|
| 116 | If you wish to run the tests, the rust tests must be removed as they are
|
---|
| 117 | currently broken due to syntax errors. To do this, issue:
|
---|
| 118 | </para>
|
---|
| 119 |
|
---|
| 120 | <screen><userinput>sed -i '138,142d' Makefile</userinput></screen>
|
---|
| 121 |
|
---|
[c1ced74d] | 122 | <para>
|
---|
[f183c1c] | 123 | To run the test suite, issue:
|
---|
[c1ced74d] | 124 | </para>
|
---|
[634e2a1] | 125 | <screen remap="test"><userinput>TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp" make check</userinput></screen>
|
---|
[0f16c7cd] | 126 | <!-- The blacklists have to be checked every release of Mercurial, do a listing
|
---|
[634e2a1] | 127 | of tests/blacklists, but do not include the README.
|
---|
| 128 | For 6.4.1 removing the -blacklist entries did not affect the test results
|
---|
| 129 | although blacklists/fsmonitor and blacklists/linux-vfat still exist. -->
|
---|
[23209a71] | 130 |
|
---|
[de33b2a] | 131 | <para>
|
---|
| 132 | where <replaceable><N></replaceable> is an integer between one
|
---|
[f183c1c] | 133 | and the number of ( processor X threads ), inclusive. Several tests
|
---|
[634e2a1] | 134 | fail because some error messages have changed in Python or
|
---|
| 135 | some deprecation warnings are printed that were not present when the
|
---|
[1a7bbb8] | 136 | test was designed.
|
---|
[f183c1c] | 137 | <!--
|
---|
[634e2a1] | 138 | # Ran 908 tests, 65 skipped, 4 failed. real 10m37.422s -bdubbs 6 Sep 22.
|
---|
| 139 | # Ran 881 tests, 102 skipped, 23 failed. -plabs 17 Nov 22.
|
---|
| 140 | # Ran 919 tests, 64 skipped, 23 failed. real 10m25.285s -bdubbs 10 Jan 23.
|
---|
| 141 | # Ran 893 tests,101 skipped, 9 failed. real 29m3.014ss -bdubbs 5 Mar 23.
|
---|
| 142 | # Ran 938 tests, 64 skipped, 8 failed. real 32m13.014ss -bdubbs 17 Apr 23.
|
---|
[1fe05eb] | 143 | -->
|
---|
[1a7bbb8] | 144 | In order to
|
---|
[de33b2a] | 145 | investigate any apparently failing tests, you may use the
|
---|
| 146 | <command>run-tests.py</command> script. To see the almost forty switches,
|
---|
| 147 | some of them very useful, issue <command>tests/run-tests.py
|
---|
| 148 | --help</command>. Running the following commands, you will execute only
|
---|
| 149 | the tests that failed before:
|
---|
| 150 | </para>
|
---|
[f60ecce] | 151 |
|
---|
[a42c273] | 152 | <screen remap="test"><userinput>pushd tests &&
|
---|
[2beaab8] | 153 | rm -rf tmp &&
|
---|
[b93e2bde] | 154 | ./run-tests.py --tmpdir tmp test-gpg.t
|
---|
[768e6fd] | 155 | popd</userinput></screen>
|
---|
[f5a75ae] | 156 |
|
---|
[de33b2a] | 157 | <para>
|
---|
[6148e28] | 158 | Normally, the previous failures will be reproducible. However, if
|
---|
[de33b2a] | 159 | you add the switch <option>--debug</option> before
|
---|
[6148e28] | 160 | <option>--tmpdir</option>, and run the tests again, some failures may
|
---|
| 161 | disappear, which is a problem with the test suite. If this happens,
|
---|
| 162 | there will be no more of these failures even if you do not pass the
|
---|
| 163 | --debug switch again.
|
---|
[de33b2a] | 164 | </para>
|
---|
[2beaab8] | 165 |
|
---|
[de33b2a] | 166 | <para>
|
---|
[7a9a7b26] | 167 | An interesting switch is <option>--time</option>, which will generate a
|
---|
| 168 | table of all the executed tests and their respective start, end, user,
|
---|
[6148e28] | 169 | system and real times once the tests are complete. Note that these
|
---|
[de33b2a] | 170 | switches may be used with <command>make check</command> by including
|
---|
| 171 | them in the <envar>TESTFLAGS</envar> environment variable.
|
---|
| 172 | </para>
|
---|
[f60ecce] | 173 |
|
---|
[de33b2a] | 174 | <para>
|
---|
| 175 | Install <application>Mercurial</application> by running the following
|
---|
| 176 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 177 | </para>
|
---|
[f5a75ae] | 178 |
|
---|
| 179 | <screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
---|
| 180 |
|
---|
[de33b2a] | 181 | <para>
|
---|
| 182 | If you built the documentation, install it by running the following
|
---|
| 183 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 184 | </para>
|
---|
[f5a75ae] | 185 |
|
---|
[a42c273] | 186 | <screen role="root"
|
---|
| 187 | remap="doc"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
---|
[f5a75ae] | 188 |
|
---|
[de33b2a] | 189 | <para>
|
---|
[8558044] | 190 | After installation, two very quick and simple tests should run
|
---|
[de33b2a] | 191 | correctly. The first one needs some configuration:
|
---|
| 192 | </para>
|
---|
[ab0c555] | 193 |
|
---|
| 194 | <screen><userinput>cat >> ~/.hgrc << "EOF"
|
---|
| 195 | <literal>[ui]
|
---|
[2beaab8] | 196 | username = <replaceable><user_name> <user@mail></replaceable></literal>
|
---|
[ab0c555] | 197 | EOF</userinput></screen>
|
---|
| 198 |
|
---|
[de33b2a] | 199 | <para>
|
---|
| 200 | where you must replace <user_name> and <your@mail> (mail
|
---|
| 201 | is optional and can be omitted). With the user identity defined, run
|
---|
| 202 | <command>hg debuginstall</command> and several lines will be displayed,
|
---|
| 203 | the last one reading "no problems detected". Another quick and simple
|
---|
| 204 | test is just <command>hg</command>, which should output basic commands
|
---|
| 205 | that can be used with <command>hg</command>.
|
---|
| 206 | </para>
|
---|
[ab0c555] | 207 |
|
---|
[f5a75ae] | 208 | </sect2>
|
---|
| 209 |
|
---|
[d445316] | 210 | <!--
|
---|
[f0190231] | 211 | <sect2 role="commands">
|
---|
| 212 | <title>Command Explanations</title>
|
---|
| 213 |
|
---|
| 214 | <para>
|
---|
[586bd9ff] | 215 | <command>2to3 -w doc/hgmanpage.py</command>: Since <application>
|
---|
[f0190231] | 216 | Python 3</application> is used with docutils, one file needs to be
|
---|
| 217 | converted in order to be compatible.
|
---|
| 218 | </para>
|
---|
| 219 |
|
---|
[d445316] | 220 | </sect2>
|
---|
| 221 | -->
|
---|
[8558044] | 222 |
|
---|
[431b5b17] | 223 | <sect2 role="configuration">
|
---|
| 224 | <title>Configuring Mercurial</title>
|
---|
| 225 |
|
---|
| 226 | <sect3 id="mercurial-config">
|
---|
| 227 | <title>Config Files</title>
|
---|
| 228 |
|
---|
| 229 | <para>
|
---|
[28320bf4] | 230 | <filename>/etc/mercurial/hgrc</filename> and
|
---|
| 231 | <filename>~/.hgrc</filename>
|
---|
[431b5b17] | 232 | </para>
|
---|
| 233 |
|
---|
| 234 | <indexterm zone="mercurial mercurial-config">
|
---|
| 235 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 |
|
---|
[28320bf4] | 238 | <indexterm zone="mercurial mercurial-config">
|
---|
| 239 | <primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
---|
| 240 | </indexterm>
|
---|
| 241 |
|
---|
[de33b2a] | 242 | <para>
|
---|
| 243 | The great majority of extensions are disabled by default. Run
|
---|
| 244 | <command>hg help extensions</command> if you need to enable any, e.g.
|
---|
[6148e28] | 245 | when investigating test failures. This will output a list of enabled
|
---|
| 246 | and disabled extensions, as well as more information such as how to
|
---|
| 247 | enable or disable extensions using configuration files.
|
---|
[de33b2a] | 248 | </para>
|
---|
[28320bf4] | 249 |
|
---|
[de33b2a] | 250 | <para>
|
---|
| 251 | If you have installed <xref linkend="make-ca"/> and want
|
---|
[d761e0a] | 252 | <application>Mercurial</application> to use the certificates,
|
---|
| 253 | as the <systemitem class="username">root</systemitem> user, issue:
|
---|
[de33b2a] | 254 | </para>
|
---|
[431b5b17] | 255 |
|
---|
| 256 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
[a20c505f] | 257 | cat > /etc/mercurial/hgrc << "EOF"
|
---|
[431b5b17] | 258 | <literal>[web]
|
---|
[5c3f3856] | 259 | cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
|
---|
[431b5b17] | 260 | EOF</userinput></screen>
|
---|
| 261 |
|
---|
| 262 | </sect3>
|
---|
| 263 |
|
---|
| 264 | </sect2>
|
---|
| 265 |
|
---|
[f5a75ae] | 266 | <sect2 role="content">
|
---|
| 267 | <title>Contents</title>
|
---|
| 268 |
|
---|
| 269 | <segmentedlist>
|
---|
| 270 | <segtitle>Installed Programs</segtitle>
|
---|
| 271 | <segtitle>Installed Libraries</segtitle>
|
---|
| 272 | <segtitle>Installed Directories</segtitle>
|
---|
| 273 |
|
---|
| 274 | <seglistitem>
|
---|
[8ad9b196] | 275 | <seg>
|
---|
| 276 | hg
|
---|
| 277 | </seg>
|
---|
| 278 | <seg>
|
---|
| 279 | several internal modules under
|
---|
[d445316] | 280 | /usr/lib/python&python3-majorver;/site-packages/mercurial
|
---|
[8ad9b196] | 281 | </seg>
|
---|
| 282 | <seg>
|
---|
[f183c1c] | 283 | /etc/mercurial,
|
---|
| 284 | /usr/lib/python&python3-majorver;/site-packages/hgdemandimport,
|
---|
| 285 | /usr/lib/python&python3-majorver;/site-packages/hgext,
|
---|
| 286 | /usr/lib/python&python3-majorver;/site-packages/hgext3rd,
|
---|
| 287 | /usr/lib/python&python3-majorver;/site-packages/mercurial, and
|
---|
| 288 | /usr/lib/python&python3-majorver;/site-packages/mercurial-&mercurial-version;-py&python3-majorver;.egg-info
|
---|
[8ad9b196] | 289 | </seg>
|
---|
[f5a75ae] | 290 | </seglistitem>
|
---|
| 291 | </segmentedlist>
|
---|
| 292 |
|
---|
| 293 | <variablelist>
|
---|
| 294 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 295 | <?dbfo list-presentation="list"?>
|
---|
| 296 | <?dbhtml list-presentation="table"?>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="hg">
|
---|
| 299 | <term><command>hg</command></term>
|
---|
| 300 | <listitem>
|
---|
[de33b2a] | 301 | <para>
|
---|
[4c24eb0a] | 302 | is the mercurial version control system
|
---|
[de33b2a] | 303 | </para>
|
---|
[f5a75ae] | 304 | <indexterm zone="mercurial hg">
|
---|
| 305 | <primary sortas="b-hg">hg</primary>
|
---|
| 306 | </indexterm>
|
---|
| 307 | </listitem>
|
---|
| 308 | </varlistentry>
|
---|
| 309 |
|
---|
| 310 | </variablelist>
|
---|
| 311 |
|
---|
| 312 | </sect2>
|
---|
| 313 |
|
---|
| 314 | </sect1>
|
---|