[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 " ">
|
---|
[cccb9e3c] | 9 | <!ENTITY mercurial-md5sum "2bbab188eaa482c6ad3db296b9e53773">
|
---|
[d128a3c] | 10 | <!ENTITY mercurial-size "7.7 MB">
|
---|
[cccb9e3c] | 11 | <!ENTITY mercurial-buildsize "76 MB (with docs, add 1.9 GB for tests)">
|
---|
[f646303] | 12 | <!ENTITY mercurial-time "0.3 SBU (with docs, add 17 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 |
|
---|
[c2f9a33] | 39 | &lfs111_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 |
|
---|
[d445316] | 77 | <!--
|
---|
[f5a75ae] | 78 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 79 | <para role="required">
|
---|
| 80 | <xref linkend="python2"/>
|
---|
| 81 | </para>
|
---|
[d445316] | 82 | -->
|
---|
[0d7900a] | 83 |
|
---|
[f5a75ae] | 84 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 85 | <para role="optional">
|
---|
[d3ea9e8] | 86 | <xref linkend="docutils"/>
|
---|
| 87 | (required to build the documentation),
|
---|
[982e5c9] | 88 | <xref linkend="git"/>,
|
---|
[169d04a] | 89 | <xref linkend="gpgme"/> (with Python bindings),
|
---|
[572553b] | 90 | <xref role="runtime" linkend="openssh"/>
|
---|
| 91 | (runtime, to access ssh://... repositories),
|
---|
[07f61e4] | 92 | <xref linkend="pygments"/>,
|
---|
[d0e51e6] | 93 | <xref linkend="rust"/> (see <filename>rust/README.rst</filename> and <filename>rust/rhg/README.md</filename>),
|
---|
[982e5c9] | 94 | <xref linkend="subversion"/> (with Python bindings),
|
---|
[b2b0d26] | 95 | <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
---|
[d1c51434] | 96 | <ulink url="http://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
[169d04a] | 97 | <ulink url="https://pypi.python.org/pypi/pyflakes">pyflakes</ulink>,
|
---|
| 98 | <ulink url="https://www.pyopenssl.org/en/stable/">pyOpenSSL</ulink>, and
|
---|
| 99 | <ulink url="https://github.com/google/re2/">re2</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 |
|
---|
[de33b2a] | 112 | <para>
|
---|
| 113 | Build <application>Mercurial</application> by issuing the following
|
---|
| 114 | command:
|
---|
| 115 | </para>
|
---|
[0d7900a] | 116 |
|
---|
[f5a75ae] | 117 | <screen><userinput>make build</userinput></screen>
|
---|
[0d7900a] | 118 |
|
---|
[de33b2a] | 119 | <para>
|
---|
| 120 | To build the documentation (requires <xref linkend="docutils"/>), issue:
|
---|
| 121 | </para>
|
---|
[f5a75ae] | 122 |
|
---|
[d445316] | 123 | <screen remap="doc"><userinput>make doc</userinput></screen>
|
---|
[f5a75ae] | 124 |
|
---|
[c1ced74d] | 125 | <para>
|
---|
[6148e28] | 126 | To run the test suite, issue (8 tests are known to fail):
|
---|
[c1ced74d] | 127 | </para>
|
---|
[d445316] | 128 | <screen remap="test"><userinput>TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp --blacklist blacklists/fsmonitor --blacklist blacklists/linux-vfat" make check</userinput></screen>
|
---|
[0f16c7cd] | 129 | <!-- The blacklists have to be checked every release of Mercurial, do a listing
|
---|
[cfc1f98] | 130 | of tests/blacklists, but do not include the README. -->
|
---|
[23209a71] | 131 |
|
---|
[de33b2a] | 132 | <para>
|
---|
| 133 | where <replaceable><N></replaceable> is an integer between one
|
---|
| 134 | and the number of ( processor X threads ), inclusive. In order to
|
---|
| 135 | investigate any apparently failing tests, you may use the
|
---|
| 136 | <command>run-tests.py</command> script. To see the almost forty switches,
|
---|
| 137 | some of them very useful, issue <command>tests/run-tests.py
|
---|
| 138 | --help</command>. Running the following commands, you will execute only
|
---|
| 139 | the tests that failed before:
|
---|
| 140 | </para>
|
---|
[f60ecce] | 141 |
|
---|
[a42c273] | 142 | <screen remap="test"><userinput>pushd tests &&
|
---|
[2beaab8] | 143 | rm -rf tmp &&
|
---|
[b93e2bde] | 144 | ./run-tests.py --tmpdir tmp test-gpg.t
|
---|
[768e6fd] | 145 | popd</userinput></screen>
|
---|
[f5a75ae] | 146 |
|
---|
[de33b2a] | 147 | <para>
|
---|
[6148e28] | 148 | Normally, the previous failures will be reproducible. However, if
|
---|
[de33b2a] | 149 | you add the switch <option>--debug</option> before
|
---|
[6148e28] | 150 | <option>--tmpdir</option>, and run the tests again, some failures may
|
---|
| 151 | disappear, which is a problem with the test suite. If this happens,
|
---|
| 152 | there will be no more of these failures even if you do not pass the
|
---|
| 153 | --debug switch again.
|
---|
[de33b2a] | 154 | </para>
|
---|
[2beaab8] | 155 |
|
---|
[de33b2a] | 156 | <para>
|
---|
[7a9a7b26] | 157 | An interesting switch is <option>--time</option>, which will generate a
|
---|
| 158 | table of all the executed tests and their respective start, end, user,
|
---|
[6148e28] | 159 | system and real times once the tests are complete. Note that these
|
---|
[de33b2a] | 160 | switches may be used with <command>make check</command> by including
|
---|
| 161 | them in the <envar>TESTFLAGS</envar> environment variable.
|
---|
| 162 | </para>
|
---|
[f60ecce] | 163 |
|
---|
[de33b2a] | 164 | <para>
|
---|
| 165 | Install <application>Mercurial</application> by running the following
|
---|
| 166 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 167 | </para>
|
---|
[f5a75ae] | 168 |
|
---|
| 169 | <screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
---|
| 170 |
|
---|
[de33b2a] | 171 | <para>
|
---|
| 172 | If you built the documentation, install it by running the following
|
---|
| 173 | command (as <systemitem class="username">root</systemitem>):
|
---|
| 174 | </para>
|
---|
[f5a75ae] | 175 |
|
---|
[a42c273] | 176 | <screen role="root"
|
---|
| 177 | remap="doc"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
---|
[f5a75ae] | 178 |
|
---|
[de33b2a] | 179 | <para>
|
---|
[8558044] | 180 | After installation, two very quick and simple tests should run
|
---|
[de33b2a] | 181 | correctly. The first one needs some configuration:
|
---|
| 182 | </para>
|
---|
[ab0c555] | 183 |
|
---|
| 184 | <screen><userinput>cat >> ~/.hgrc << "EOF"
|
---|
| 185 | <literal>[ui]
|
---|
[2beaab8] | 186 | username = <replaceable><user_name> <user@mail></replaceable></literal>
|
---|
[ab0c555] | 187 | EOF</userinput></screen>
|
---|
| 188 |
|
---|
[de33b2a] | 189 | <para>
|
---|
| 190 | where you must replace <user_name> and <your@mail> (mail
|
---|
| 191 | is optional and can be omitted). With the user identity defined, run
|
---|
| 192 | <command>hg debuginstall</command> and several lines will be displayed,
|
---|
| 193 | the last one reading "no problems detected". Another quick and simple
|
---|
| 194 | test is just <command>hg</command>, which should output basic commands
|
---|
| 195 | that can be used with <command>hg</command>.
|
---|
| 196 | </para>
|
---|
[ab0c555] | 197 |
|
---|
[f5a75ae] | 198 | </sect2>
|
---|
| 199 |
|
---|
[d445316] | 200 | <!--
|
---|
[f0190231] | 201 | <sect2 role="commands">
|
---|
| 202 | <title>Command Explanations</title>
|
---|
| 203 |
|
---|
| 204 | <para>
|
---|
[586bd9ff] | 205 | <command>2to3 -w doc/hgmanpage.py</command>: Since <application>
|
---|
[f0190231] | 206 | Python 3</application> is used with docutils, one file needs to be
|
---|
| 207 | converted in order to be compatible.
|
---|
| 208 | </para>
|
---|
| 209 |
|
---|
[d445316] | 210 | </sect2>
|
---|
| 211 | -->
|
---|
[8558044] | 212 |
|
---|
[431b5b17] | 213 | <sect2 role="configuration">
|
---|
| 214 | <title>Configuring Mercurial</title>
|
---|
| 215 |
|
---|
| 216 | <sect3 id="mercurial-config">
|
---|
| 217 | <title>Config Files</title>
|
---|
| 218 |
|
---|
| 219 | <para>
|
---|
[28320bf4] | 220 | <filename>/etc/mercurial/hgrc</filename> and
|
---|
| 221 | <filename>~/.hgrc</filename>
|
---|
[431b5b17] | 222 | </para>
|
---|
| 223 |
|
---|
| 224 | <indexterm zone="mercurial mercurial-config">
|
---|
| 225 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 |
|
---|
[28320bf4] | 228 | <indexterm zone="mercurial mercurial-config">
|
---|
| 229 | <primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 |
|
---|
[de33b2a] | 232 | <para>
|
---|
| 233 | The great majority of extensions are disabled by default. Run
|
---|
| 234 | <command>hg help extensions</command> if you need to enable any, e.g.
|
---|
[6148e28] | 235 | when investigating test failures. This will output a list of enabled
|
---|
| 236 | and disabled extensions, as well as more information such as how to
|
---|
| 237 | enable or disable extensions using configuration files.
|
---|
[de33b2a] | 238 | </para>
|
---|
[28320bf4] | 239 |
|
---|
[de33b2a] | 240 | <para>
|
---|
| 241 | If you have installed <xref linkend="make-ca"/> and want
|
---|
[d761e0a] | 242 | <application>Mercurial</application> to use the certificates,
|
---|
| 243 | as the <systemitem class="username">root</systemitem> user, issue:
|
---|
[de33b2a] | 244 | </para>
|
---|
[431b5b17] | 245 |
|
---|
| 246 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
[a20c505f] | 247 | cat > /etc/mercurial/hgrc << "EOF"
|
---|
[431b5b17] | 248 | <literal>[web]
|
---|
[5c3f3856] | 249 | cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
|
---|
[431b5b17] | 250 | EOF</userinput></screen>
|
---|
| 251 |
|
---|
| 252 | </sect3>
|
---|
| 253 |
|
---|
| 254 | </sect2>
|
---|
| 255 |
|
---|
[f5a75ae] | 256 | <sect2 role="content">
|
---|
| 257 | <title>Contents</title>
|
---|
| 258 |
|
---|
| 259 | <segmentedlist>
|
---|
| 260 | <segtitle>Installed Programs</segtitle>
|
---|
| 261 | <segtitle>Installed Libraries</segtitle>
|
---|
| 262 | <segtitle>Installed Directories</segtitle>
|
---|
| 263 |
|
---|
| 264 | <seglistitem>
|
---|
[8ad9b196] | 265 | <seg>
|
---|
| 266 | hg
|
---|
| 267 | </seg>
|
---|
| 268 | <seg>
|
---|
| 269 | several internal modules under
|
---|
[d445316] | 270 | /usr/lib/python&python3-majorver;/site-packages/mercurial
|
---|
[8ad9b196] | 271 | </seg>
|
---|
| 272 | <seg>
|
---|
[9c4ca99] | 273 | /etc/mercurial and
|
---|
[d445316] | 274 | /usr/lib/python&python3-majorver;/site-packages/{hgdemandimport,hgext,hgext3rd,mercurial}
|
---|
[8ad9b196] | 275 | </seg>
|
---|
[f5a75ae] | 276 | </seglistitem>
|
---|
| 277 | </segmentedlist>
|
---|
| 278 |
|
---|
| 279 | <variablelist>
|
---|
| 280 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 281 | <?dbfo list-presentation="list"?>
|
---|
| 282 | <?dbhtml list-presentation="table"?>
|
---|
| 283 |
|
---|
| 284 | <varlistentry id="hg">
|
---|
| 285 | <term><command>hg</command></term>
|
---|
| 286 | <listitem>
|
---|
[de33b2a] | 287 | <para>
|
---|
[4c24eb0a] | 288 | is the mercurial version control system
|
---|
[de33b2a] | 289 | </para>
|
---|
[f5a75ae] | 290 | <indexterm zone="mercurial hg">
|
---|
| 291 | <primary sortas="b-hg">hg</primary>
|
---|
| 292 | </indexterm>
|
---|
| 293 | </listitem>
|
---|
| 294 | </varlistentry>
|
---|
| 295 |
|
---|
| 296 | </variablelist>
|
---|
| 297 |
|
---|
| 298 | </sect2>
|
---|
| 299 |
|
---|
| 300 | </sect1>
|
---|