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