[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 " ">
|
---|
[aec0560] | 9 | <!ENTITY mercurial-md5sum "824b839a6e948844b81c757968f888bc">
|
---|
[f977d64] | 10 | <!ENTITY mercurial-size "7.2 MB">
|
---|
[aec0560] | 11 | <!ENTITY mercurial-buildsize "78 MB (with docs, add 1.0 GB for tests)">
|
---|
[586bd9ff] | 12 | <!ENTITY mercurial-time "0.5 SBU (with docs, add 11 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 |
|
---|
[90c883f] | 40 | &lfs91_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 |
|
---|
| 78 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 79 | <para role="required">
|
---|
| 80 | <xref linkend="python2"/>
|
---|
| 81 | </para>
|
---|
[0d7900a] | 82 |
|
---|
[f5a75ae] | 83 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 84 | <para role="optional">
|
---|
[d3ea9e8] | 85 | <xref linkend="docutils"/>
|
---|
| 86 | (required to build the documentation),
|
---|
[982e5c9] | 87 | <xref linkend="git"/>,
|
---|
[e803c07e] | 88 | <xref linkend="gnupg2"/> (<command>gpg2</command> with Python bindings),
|
---|
[572553b] | 89 | <xref role="runtime" linkend="openssh"/>
|
---|
| 90 | (runtime, to access ssh://... repositories),
|
---|
[07f61e4] | 91 | <xref linkend="pygments"/>,
|
---|
[982e5c9] | 92 | <xref linkend="subversion"/> (with Python bindings),
|
---|
[b2b0d26] | 93 | <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
---|
[d1c51434] | 94 | <ulink url="http://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
[07f61e4] | 95 | <ulink url="https://pypi.python.org/pypi/pyflakes">pyflakes</ulink>, and
|
---|
[6c88333] | 96 | <ulink url="https://github.com/pyca/pyopenssl">pyOpenSSL</ulink>
|
---|
[982e5c9] | 97 |
|
---|
[f5a75ae] | 98 | </para>
|
---|
| 99 |
|
---|
| 100 | <para condition="html" role="usernotes">User Notes:
|
---|
| 101 | <ulink url="&blfs-wiki;/mercurial"/></para>
|
---|
| 102 |
|
---|
| 103 | </sect2>
|
---|
| 104 |
|
---|
| 105 | <sect2 role="installation">
|
---|
| 106 | <title>Installation of Mercurial</title>
|
---|
[0f16c7cd] | 107 | <!-- seems to have a development rust port -->
|
---|
[f5a75ae] | 108 |
|
---|
[de33b2a] | 109 | <para>
|
---|
| 110 | Build <application>Mercurial</application> by issuing the following
|
---|
| 111 | command:
|
---|
| 112 | </para>
|
---|
[0d7900a] | 113 |
|
---|
[f5a75ae] | 114 | <screen><userinput>make build</userinput></screen>
|
---|
[0d7900a] | 115 |
|
---|
[de33b2a] | 116 | <para>
|
---|
| 117 | To build the documentation (requires <xref linkend="docutils"/>), issue:
|
---|
| 118 | </para>
|
---|
[f5a75ae] | 119 |
|
---|
[586bd9ff] | 120 | <screen remap="doc"><userinput>2to3 -w doc/hgmanpage.py &&
|
---|
| 121 | PYTHON=python3 make doc</userinput></screen>
|
---|
[f5a75ae] | 122 |
|
---|
[c1ced74d] | 123 | <para>
|
---|
| 124 | To run the test suite, issue:
|
---|
| 125 | </para>
|
---|
[a42c273] | 126 | <screen remap="test"><userinput>rm -rf tests/tmp &&
|
---|
[0f16c7cd] | 127 | TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp --blacklist blacklists/fsmonitor --blacklist blacklists/linux-vfat" make check</userinput></screen>
|
---|
| 128 | <!-- The blacklists have to be checked every release of Mercurial, do a listing
|
---|
| 129 | of tests/blacklists, but do not include the makefile. -->
|
---|
[23209a71] | 130 |
|
---|
[de33b2a] | 131 | <para>
|
---|
| 132 | where <replaceable><N></replaceable> is an integer between one
|
---|
| 133 | and the number of ( processor X threads ), inclusive. In order to
|
---|
| 134 | investigate any apparently failing tests, you may use the
|
---|
| 135 | <command>run-tests.py</command> script. To see the almost forty switches,
|
---|
| 136 | some of them very useful, issue <command>tests/run-tests.py
|
---|
| 137 | --help</command>. Running the following commands, you will execute only
|
---|
| 138 | the tests that failed before:
|
---|
| 139 | </para>
|
---|
[f60ecce] | 140 |
|
---|
[a42c273] | 141 | <screen remap="test"><userinput>pushd tests &&
|
---|
[2beaab8] | 142 | rm -rf tmp &&
|
---|
[b93e2bde] | 143 | ./run-tests.py --tmpdir tmp test-gpg.t
|
---|
[768e6fd] | 144 | popd</userinput></screen>
|
---|
[f5a75ae] | 145 |
|
---|
[de33b2a] | 146 | <para>
|
---|
| 147 | Normally, the previous failures will be confirmed. However, if
|
---|
| 148 | you add the switch <option>--debug</option> before
|
---|
| 149 | <option>--tmpdir</option>, and run again, some failures are gone, which
|
---|
| 150 | seems to be a problem with the test suite. If this happens, normally,
|
---|
| 151 | from now on, there will be no more such failures whether you use the
|
---|
| 152 | debug switch or not. Three tests, test-alias.t, test-install.t, and
|
---|
| 153 | test-bundle2-exchange.t (intermittently), are known to fail.
|
---|
| 154 | </para>
|
---|
[2beaab8] | 155 |
|
---|
[de33b2a] | 156 | <para>
|
---|
| 157 | An interesting switch is <option>--time</option>, which will generate at
|
---|
| 158 | the end of the test suite execution, a table with all executed tests and
|
---|
| 159 | respective start, end, user, system and real times. Note that the
|
---|
| 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>
|
---|
| 180 | After installation, two very quick and simple tests should run
|
---|
| 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 |
|
---|
[f0190231] | 200 | <sect2 role="commands">
|
---|
| 201 | <title>Command Explanations</title>
|
---|
| 202 |
|
---|
| 203 | <para>
|
---|
[586bd9ff] | 204 | <command>2to3 -w doc/hgmanpage.py</command>: Since <application>
|
---|
[f0190231] | 205 | Python 3</application> is used with docutils, one file needs to be
|
---|
| 206 | converted in order to be compatible.
|
---|
| 207 | </para>
|
---|
| 208 |
|
---|
| 209 | </sect2>
|
---|
[431b5b17] | 210 | <sect2 role="configuration">
|
---|
| 211 | <title>Configuring Mercurial</title>
|
---|
| 212 |
|
---|
| 213 | <sect3 id="mercurial-config">
|
---|
| 214 | <title>Config Files</title>
|
---|
| 215 |
|
---|
| 216 | <para>
|
---|
[28320bf4] | 217 | <filename>/etc/mercurial/hgrc</filename> and
|
---|
| 218 | <filename>~/.hgrc</filename>
|
---|
[431b5b17] | 219 | </para>
|
---|
| 220 |
|
---|
| 221 | <indexterm zone="mercurial mercurial-config">
|
---|
| 222 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 |
|
---|
[28320bf4] | 225 | <indexterm zone="mercurial mercurial-config">
|
---|
| 226 | <primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 |
|
---|
[de33b2a] | 229 | <para>
|
---|
| 230 | The great majority of extensions are disabled by default. Run
|
---|
| 231 | <command>hg help extensions</command> if you need to enable any, e.g.
|
---|
| 232 | when investigating test failures. You will obtain the lists of enabled
|
---|
| 233 | and disabled extensions, and more information, such as how to enable
|
---|
| 234 | or disable them using configuration files.
|
---|
| 235 | </para>
|
---|
[28320bf4] | 236 |
|
---|
[de33b2a] | 237 | <para>
|
---|
| 238 | If you have installed <xref linkend="make-ca"/> and want
|
---|
| 239 | <application>Mercurial</application> to use them, as the <systemitem
|
---|
| 240 | class="username">root</systemitem> user, issue:
|
---|
| 241 | </para>
|
---|
[431b5b17] | 242 |
|
---|
| 243 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
[a20c505f] | 244 | cat > /etc/mercurial/hgrc << "EOF"
|
---|
[431b5b17] | 245 | <literal>[web]
|
---|
[5c3f3856] | 246 | cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
|
---|
[431b5b17] | 247 | EOF</userinput></screen>
|
---|
| 248 |
|
---|
| 249 | </sect3>
|
---|
| 250 |
|
---|
| 251 | </sect2>
|
---|
| 252 |
|
---|
[f5a75ae] | 253 | <sect2 role="content">
|
---|
| 254 | <title>Contents</title>
|
---|
| 255 |
|
---|
| 256 | <segmentedlist>
|
---|
| 257 | <segtitle>Installed Programs</segtitle>
|
---|
| 258 | <segtitle>Installed Libraries</segtitle>
|
---|
| 259 | <segtitle>Installed Directories</segtitle>
|
---|
| 260 |
|
---|
| 261 | <seglistitem>
|
---|
[8ad9b196] | 262 | <seg>
|
---|
| 263 | hg
|
---|
| 264 | </seg>
|
---|
| 265 | <seg>
|
---|
| 266 | several internal modules under
|
---|
| 267 | /usr/lib/python&python2-majorver;/site-packages/mercurial
|
---|
| 268 | </seg>
|
---|
| 269 | <seg>
|
---|
[9c4ca99] | 270 | /etc/mercurial and
|
---|
[a20c505f] | 271 | /usr/lib/python&python2-majorver;/site-packages/{hgdemandimport,hgext,hgext3rd,mercurial}
|
---|
[8ad9b196] | 272 | </seg>
|
---|
[f5a75ae] | 273 | </seglistitem>
|
---|
| 274 | </segmentedlist>
|
---|
| 275 |
|
---|
| 276 | <variablelist>
|
---|
| 277 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 278 | <?dbfo list-presentation="list"?>
|
---|
| 279 | <?dbhtml list-presentation="table"?>
|
---|
| 280 |
|
---|
| 281 | <varlistentry id="hg">
|
---|
| 282 | <term><command>hg</command></term>
|
---|
| 283 | <listitem>
|
---|
[de33b2a] | 284 | <para>
|
---|
| 285 | is the mercurial version control system.
|
---|
| 286 | </para>
|
---|
[f5a75ae] | 287 | <indexterm zone="mercurial hg">
|
---|
| 288 | <primary sortas="b-hg">hg</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
| 293 | </variablelist>
|
---|
| 294 |
|
---|
| 295 | </sect2>
|
---|
| 296 |
|
---|
| 297 | </sect1>
|
---|