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