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