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