[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 " ">
|
---|
[a8a772b3] | 9 | <!ENTITY mercurial-md5sum "cebd60f39965480879d268d6e13e3d30">
|
---|
[28320bf4] | 10 | <!ENTITY mercurial-size "4.5 MB">
|
---|
[c55368ec] | 11 | <!ENTITY mercurial-buildsize "53 MB (with documentation, 374 MB with docs and tests)">
|
---|
| 12 | <!ENTITY mercurial-time "less than 0.1 SBU (with documentation, 13 SBU with docs and tests)">
|
---|
[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 |
|
---|
[0eeaa26] | 38 | &lfs79_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">
|
---|
[982e5c9] | 71 | <xref linkend="git"/>,
|
---|
[e803c07e] | 72 | <xref linkend="gnupg2"/> (<command>gpg2</command> with Python bindings),
|
---|
[982e5c9] | 73 | <xref linkend="subversion"/> (with Python bindings),
|
---|
[b2b0d26] | 74 | <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
|
---|
[d1c51434] | 75 | <ulink url="http://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
[23209a71] | 76 | <ulink url="http://docutils.sourceforge.net/">Docutils</ulink> (required to build the documentation),
|
---|
[982e5c9] | 77 | <ulink url="http://pypi.python.org/pypi/pyflakes">pyflakes</ulink>,
|
---|
| 78 | <ulink url="http://pygments.org/">pygments</ulink>, and
|
---|
| 79 | <ulink url="https://launchpad.net/pyopenssl">pyOpenSSL</ulink>
|
---|
| 80 |
|
---|
[f5a75ae] | 81 | </para>
|
---|
| 82 |
|
---|
| 83 | <para condition="html" role="usernotes">User Notes:
|
---|
| 84 | <ulink url="&blfs-wiki;/mercurial"/></para>
|
---|
| 85 |
|
---|
| 86 | </sect2>
|
---|
| 87 |
|
---|
| 88 | <sect2 role="installation">
|
---|
| 89 | <title>Installation of Mercurial</title>
|
---|
| 90 |
|
---|
[0d7900a] | 91 | <para>Build <application>Mercurial</application> by issuing the following
|
---|
[f5a75ae] | 92 | command:</para>
|
---|
[0d7900a] | 93 |
|
---|
[f5a75ae] | 94 | <screen><userinput>make build</userinput></screen>
|
---|
[0d7900a] | 95 |
|
---|
| 96 | <para>To build the documentation (requires
|
---|
[f5a75ae] | 97 | <application>Docutils</application>), issue:</para>
|
---|
| 98 |
|
---|
| 99 | <screen><userinput>make doc</userinput></screen>
|
---|
| 100 |
|
---|
[2beaab8] | 101 | <para>Running the test suite is optional. Tests which fail may be disabled,
|
---|
| 102 | adding each one to <filename>tests/blacklists/failed-tests</filename>. In
|
---|
| 103 | order to execute the test suite using the temporary directory <filename
|
---|
| 104 | class="directory">tests/tmp</filename> and skipping the failing tests,
|
---|
[28320bf4] | 105 | issue:</para>
|
---|
[23209a71] | 106 |
|
---|
[a6e00f8] | 107 | <screen><userinput>cat > tests/blacklists/failed-tests << "EOF"
|
---|
| 108 | <literal># Test Failures
|
---|
[c55368ec] | 109 | test-run-tests.t
|
---|
| 110 | test-highlight.t</literal>
|
---|
[23209a71] | 111 | EOF
|
---|
[2beaab8] | 112 |
|
---|
[23209a71] | 113 | rm -rf tests/tmp &&
|
---|
[2beaab8] | 114 |
|
---|
[73b06df] | 115 | TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp --blacklist blacklists/failed-tests" \
|
---|
[23209a71] | 116 | make check</userinput></screen>
|
---|
| 117 |
|
---|
[73b06df] | 118 | <para>where <replaceable><N></replaceable> is an integer between one
|
---|
[28320bf4] | 119 | and the number of ( processor X threads ), inclusive. In order to
|
---|
| 120 | investigate the apparently failing tests, you may use the
|
---|
[c55368ec] | 121 | <command>run-tests.py</command> script. To see the almost forty switches,
|
---|
[28320bf4] | 122 | some of them very useful, issue <command>tests/run-tests.py --help</command>.
|
---|
| 123 | Running the following commands, you will execute only the tests that failed
|
---|
| 124 | before:</para>
|
---|
[768e6fd] | 125 |
|
---|
[2beaab8] | 126 | <screen><userinput>pushd tests &&
|
---|
| 127 | rm -rf tmp &&
|
---|
| 128 |
|
---|
[c55368ec] | 129 | ./run-tests.py --tmpdir tmp \
|
---|
| 130 | test-run-tests.t \
|
---|
| 131 | test-highlight.t &&
|
---|
[768e6fd] | 132 | popd</userinput></screen>
|
---|
[f5a75ae] | 133 |
|
---|
[c55368ec] | 134 | <para>Normally, the previous failures will be confirmed. However, if
|
---|
| 135 | you add the switch
|
---|
[bd86aa8] | 136 | "--debug" before "--tmpdir", and run again, some failures are gone, which
|
---|
| 137 | seems to be a problem with the test suite. If this happens, normally, from
|
---|
| 138 | now on, there will be no more such failures whether you use the debug switch
|
---|
| 139 | or not.</para>
|
---|
[2beaab8] | 140 |
|
---|
[c55368ec] | 141 | <para>An interesting switch is "--time", which will generate at the end of
|
---|
[2beaab8] | 142 | the test suite execution, a table with all executed tests and respective
|
---|
| 143 | start, end, user, system and real times. Notice that the switches may be
|
---|
| 144 | used with <command>make check</command>, including them in the
|
---|
[28320bf4] | 145 | <envar>TESTFLAGS</envar> environment variable.</para>
|
---|
| 146 |
|
---|
[73b06df] | 147 | <para>Install <application>Mercurial</application> by running the following
|
---|
| 148 | command (as <systemitem class="username">root</systemitem>):</para>
|
---|
[f5a75ae] | 149 |
|
---|
| 150 | <screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
---|
| 151 |
|
---|
[73b06df] | 152 | <para>If you built the documentation, install it by running the following
|
---|
| 153 | command (as <systemitem class="username">root</systemitem>):</para>
|
---|
[f5a75ae] | 154 |
|
---|
| 155 | <screen role="root"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
---|
| 156 |
|
---|
[ab0c555] | 157 | <para>After installed, two very quick and simple tests should run correctly.
|
---|
| 158 | First one needs some configuration:</para>
|
---|
| 159 |
|
---|
| 160 | <screen><userinput>cat >> ~/.hgrc << "EOF"
|
---|
| 161 | <literal>[ui]
|
---|
[2beaab8] | 162 | username = <replaceable><user_name> <user@mail></replaceable></literal>
|
---|
[ab0c555] | 163 | EOF</userinput></screen>
|
---|
| 164 |
|
---|
| 165 | <para>where you must replace <user_name> and <your@mail> (mail
|
---|
[a407a1c] | 166 | is optional and can be omitted). With the user identity defined, run
|
---|
[7b88d5a] | 167 | <command>hg debuginstall</command> and several lines will be displayed,
|
---|
[ab0c555] | 168 | the last one reading "no problems detected". Another quick and simple test
|
---|
| 169 | is just <command>hg</command>, which should output basic commands that can
|
---|
| 170 | be used with <command>hg</command>.</para>
|
---|
| 171 |
|
---|
[f5a75ae] | 172 | </sect2>
|
---|
| 173 |
|
---|
[431b5b17] | 174 | <sect2 role="configuration">
|
---|
| 175 | <title>Configuring Mercurial</title>
|
---|
| 176 |
|
---|
| 177 | <sect3 id="mercurial-config">
|
---|
| 178 | <title>Config Files</title>
|
---|
| 179 |
|
---|
| 180 | <para>
|
---|
[28320bf4] | 181 | <filename>/etc/mercurial/hgrc</filename> and
|
---|
| 182 | <filename>~/.hgrc</filename>
|
---|
[431b5b17] | 183 | </para>
|
---|
| 184 |
|
---|
| 185 | <indexterm zone="mercurial mercurial-config">
|
---|
| 186 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
| 187 | </indexterm>
|
---|
| 188 |
|
---|
[28320bf4] | 189 | <indexterm zone="mercurial mercurial-config">
|
---|
| 190 | <primary sortas="e-AA.hgrc">~/.hgrc</primary>
|
---|
| 191 | </indexterm>
|
---|
| 192 |
|
---|
[2beaab8] | 193 | <para>The great majority of extensions are disabled by default. Run
|
---|
| 194 | <command>hg help extensions</command> if you need to enable any, e.g.
|
---|
| 195 | when investigating test failures. You will obtain the lists of enabled and
|
---|
| 196 | disabled extensions, and more information, such as how to enable or
|
---|
| 197 | disable them using configuration files.</para>
|
---|
[28320bf4] | 198 |
|
---|
[2beaab8] | 199 | <para>If you have installed the <xref linkend="cacerts"/> and want
|
---|
| 200 | <application>Mercurial</application> to use them, as the <systemitem
|
---|
| 201 | class="username">root</systemitem> user, issue:</para>
|
---|
[431b5b17] | 202 |
|
---|
| 203 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
[2beaab8] | 204 | cat >> /etc/mercurial/hgrc << "EOF"
|
---|
[431b5b17] | 205 | <literal>[web]
|
---|
| 206 | cacerts = /etc/ssl/ca-bundle.crt</literal>
|
---|
| 207 | EOF</userinput></screen>
|
---|
| 208 |
|
---|
| 209 | </sect3>
|
---|
| 210 |
|
---|
| 211 | </sect2>
|
---|
| 212 |
|
---|
[f5a75ae] | 213 | <sect2 role="content">
|
---|
| 214 | <title>Contents</title>
|
---|
| 215 |
|
---|
| 216 | <segmentedlist>
|
---|
| 217 | <segtitle>Installed Programs</segtitle>
|
---|
| 218 | <segtitle>Installed Libraries</segtitle>
|
---|
| 219 | <segtitle>Installed Directories</segtitle>
|
---|
| 220 |
|
---|
| 221 | <seglistitem>
|
---|
[8ad9b196] | 222 | <seg>
|
---|
| 223 | hg
|
---|
| 224 | </seg>
|
---|
| 225 | <seg>
|
---|
| 226 | several internal modules under
|
---|
| 227 | /usr/lib/python&python2-majorver;/site-packages/mercurial
|
---|
| 228 | </seg>
|
---|
| 229 | <seg>
|
---|
[9c4ca99] | 230 | /etc/mercurial and
|
---|
| 231 | /usr/lib/python&python2-majorver;/site-packages/{hgext,mercurial}
|
---|
[8ad9b196] | 232 | </seg>
|
---|
[f5a75ae] | 233 | </seglistitem>
|
---|
| 234 | </segmentedlist>
|
---|
| 235 |
|
---|
| 236 | <variablelist>
|
---|
| 237 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 238 | <?dbfo list-presentation="list"?>
|
---|
| 239 | <?dbhtml list-presentation="table"?>
|
---|
| 240 |
|
---|
| 241 | <varlistentry id="hg">
|
---|
| 242 | <term><command>hg</command></term>
|
---|
| 243 | <listitem>
|
---|
| 244 | <para>is the program file for mercurial.</para>
|
---|
| 245 | <indexterm zone="mercurial hg">
|
---|
| 246 | <primary sortas="b-hg">hg</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
| 250 |
|
---|
| 251 | </variablelist>
|
---|
| 252 |
|
---|
| 253 | </sect2>
|
---|
| 254 |
|
---|
| 255 | </sect1>
|
---|