source: general/prog/mercurial.xml

trunk
Last change on this file was a738222, checked in by Bruce Dubbs <bdubbs@…>, 3 weeks ago

Update to mercurial-6.7.2.

  • Property mode set to 100644
File size: 11.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "55a079ac42931797d87fabe45018f758">
10 <!ENTITY mercurial-size "7.9 MB">
11 <!ENTITY mercurial-buildsize "80 MB (with docs, add 1.6 GB for tests)">
12 <!ENTITY mercurial-time "0.4 SBU (with docs; add 12 SBU for tests; both using parallelism=8)">
13]>
14
15<sect1 id="mercurial" xreflabel="Mercurial-&mercurial-version;">
16 <?dbhtml filename="mercurial.html"?>
17
18
19 <title>Mercurial-&mercurial-version;</title>
20
21 <indexterm zone="mercurial">
22 <primary sortas="a-mercurial">mercurial</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Mercurial</title>
27
28 <para>
29 <application>Mercurial</application> is a distributed source control
30 management tool similar to <application>Git</application> and
31 <application>Bazaar</application>. <application>Mercurial</application>
32 is written in <application>Python</application> and is used by projects
33 such as Mozilla for Firefox and Thunderbird.
34 </para>
35
36 &lfs121_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>
42 Download (HTTP): <ulink url="&mercurial-download-http;"/>
43 </para>
44 </listitem>
45 <listitem>
46 <para>
47 Download (FTP): <ulink url="&mercurial-download-ftp;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download MD5 sum: &mercurial-md5sum;
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download size: &mercurial-size;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Estimated disk space required: &mercurial-buildsize;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated build time: &mercurial-time;
68 </para>
69 </listitem>
70 </itemizedlist>
71
72 <bridgehead renderas="sect3">Mercurial Dependencies</bridgehead>
73
74 <bridgehead renderas="sect4">Optional</bridgehead>
75 <para role="optional">
76 <xref linkend="docutils"/>
77 (required to build the documentation),
78 <xref linkend="git"/>,
79 <xref linkend="gpgme"/> (with Python bindings),
80 <xref role="runtime" linkend="openssh"/>
81 (runtime, to access ssh://... repositories),
82 <xref linkend="pygments"/>,
83 <xref linkend="rust"/> (see <filename>rust/README.rst</filename> and <filename>rust/rhg/README.md</filename>),
84 <xref linkend="subversion"/> (with Python bindings),
85 <ulink url="https://launchpad.net/bzr">Bazaar</ulink>,
86 <ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
87 <ulink url="https://pypi.python.org/pypi/pyflakes">pyflakes</ulink>,
88 <ulink url="https://www.pyopenssl.org/en/stable/">pyOpenSSL</ulink>, and
89 <ulink url="https://github.com/google/re2/">re2</ulink>
90 </para>
91
92 </sect2>
93
94 <sect2 role="installation">
95 <title>Installation of Mercurial</title>
96 <!-- Rust port is now part of the standard tests -->
97
98 <para>
99 Build <application>Mercurial</application> by issuing the following
100 command:
101 </para>
102
103<screen><userinput>make build</userinput></screen>
104
105 <para>
106 To build the documentation (requires <xref linkend="docutils"/>), issue:
107 </para>
108
109<screen remap="doc"><userinput>make doc</userinput></screen>
110<!--
111 The tests do not hang. Better to just report what failed.
112 <para>
113 If you wish to run the tests, the rust tests must be removed as they are
114 currently broken due to syntax errors. To do this, issue:
115 </para>
116
117<screen><userinput>sed -i '138,142d' Makefile</userinput></screen>
118-->
119 <para>
120 To run the test suite, issue:
121 </para>
122<screen remap="test"><userinput>TESTFLAGS="-j<replaceable>&lt;N&gt;</replaceable> --tmpdir tmp" make check</userinput></screen>
123<!-- The blacklists have to be checked every release of Mercurial, do a listing
124 of tests/blacklists, but do not include the README.
125 For 6.4.1 removing the -blacklist entries did not affect the test results
126 although blacklists/fsmonitor and blacklists/linux-vfat still exist. -->
127
128 <para>
129 where <replaceable>&lt;N&gt;</replaceable> is an integer between one
130 and the number of ( processor X threads ), inclusive. Tests may
131 fail because some error messages have changed in Python or
132 some deprecation warnings are printed that were not present when the
133 test was designed. Two tests are known to fail: test-duplicateoptions.py
134 and test-profile.t.
135 </para>
136 <!--
137 # Ran 908 tests, 65 skipped, 4 failed. real 10m37.422s -bdubbs 6 Sep 22.
138 # Ran 881 tests,102 skipped, 23 failed. -plabs 17 Nov 22.
139 # Ran 919 tests, 64 skipped, 23 failed. real 10m25.285s -bdubbs 10 Jan 23.
140 # Ran 893 tests,101 skipped, 9 failed. real 29m03.014s -bdubbs 5 Mar 23.
141 # Ran 938 tests, 64 skipped, 8 failed. real 32m13.014s -bdubbs 17 Apr 23.
142 # Ran 935 tests, 69 skipped, 8 failed. real 26m15.875s -bdubbs 10 Jun 23.
143 # Ran 940 tests, 64 skipped, 8 failed. real omitted -bdubbs 26 Jun 23.
144 # Ran 948 tests, 66 skipped, 0 failed. -pierre 12 Jul 23 (mercurial-6.5).
145 # Ran 950 tests, 65 skipped, 1 failed. -pierre 8 Nov 23 (mercurial-6.5.3).
146 # Ran 948 tests, 66 skipped, 0 failed. -renodr 22 Nov 23 (mercurial-6.6).
147 # Ran 946 tests, 71 skipped, 2 failed. -bdubbs 20 Mar 24 (mercurial-6.7).
148 -->
149 <para>
150 In order to
151 investigate any apparently failing tests, you may use the
152 <command>run-tests.py</command> script. To see the almost forty switches,
153 some of them very useful, issue <command>tests/run-tests.py
154 --help</command>. Running the following commands, you will execute only
155 the tests that failed before:
156 </para>
157
158<screen remap="test"><userinput>pushd tests &amp;&amp;
159 rm -rf tmp &amp;&amp;
160 ./run-tests.py --tmpdir tmp test-gpg.t
161popd</userinput></screen>
162
163 <para>
164 Normally, the previous failures will be reproducible. However, if
165 you add the switch <option>--debug</option> before
166 <option>--tmpdir</option>, and run the tests again, some failures may
167 disappear, which is a problem with the test suite. If this happens,
168 there will be no more of these failures even if you do not pass the
169 --debug switch again.
170 </para>
171
172 <para>
173 An interesting switch is <option>--time</option>, which will generate a
174 table of all the executed tests and their respective start, end, user,
175 system and real times once the tests are complete. Note that these
176 switches may be used with <command>make check</command> by including
177 them in the <envar>TESTFLAGS</envar> environment variable.
178 </para>
179
180 <para>
181 Install <application>Mercurial</application> by running the following
182 command (as <systemitem class="username">root</systemitem>):
183 </para>
184
185<screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
186
187 <para>
188 If you built the documentation, install it by running the following
189 command (as <systemitem class="username">root</systemitem>):
190 </para>
191
192<screen role="root"
193 remap="doc"><userinput>make PREFIX=/usr install-doc</userinput></screen>
194
195 <para>
196 After installation, two very quick and simple tests should run
197 correctly. The first one needs some configuration:
198 </para>
199
200<screen><userinput>cat &gt;&gt; ~/.hgrc &lt;&lt; "EOF"
201<literal>[ui]
202username = <replaceable>&lt;user_name&gt; &lt;user@mail&gt;</replaceable></literal>
203EOF</userinput></screen>
204
205 <para>
206 where you must replace &lt;user_name&gt; and &lt;your@mail&gt; (mail
207 is optional and can be omitted). With the user identity defined, run
208 <command>hg debuginstall</command> and several lines will be displayed,
209 the last one reading "no problems detected". Another quick and simple
210 test is just <command>hg</command>, which should output basic commands
211 that can be used with <command>hg</command>.
212 </para>
213
214 </sect2>
215
216<!--
217 <sect2 role="commands">
218 <title>Command Explanations</title>
219
220 <para>
221 <command>2to3 -w doc/hgmanpage.py</command>: Since <application>
222 Python 3</application> is used with docutils, one file needs to be
223 converted in order to be compatible.
224 </para>
225
226 </sect2>
227-->
228
229 <sect2 role="configuration">
230 <title>Configuring Mercurial</title>
231
232 <sect3 id="mercurial-config">
233 <title>Config Files</title>
234
235 <para>
236 <filename>/etc/mercurial/hgrc</filename> and
237 <filename>~/.hgrc</filename>
238 </para>
239
240 <indexterm zone="mercurial mercurial-config">
241 <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
242 </indexterm>
243
244 <indexterm zone="mercurial mercurial-config">
245 <primary sortas="e-AA.hgrc">~/.hgrc</primary>
246 </indexterm>
247
248 <para>
249 The great majority of extensions are disabled by default. Run
250 <command>hg help extensions</command> if you need to enable any, e.g.
251 when investigating test failures. This will output a list of enabled
252 and disabled extensions, as well as more information such as how to
253 enable or disable extensions using configuration files.
254 </para>
255
256 <para>
257 If you have installed <xref linkend="make-ca"/> and want
258 <application>Mercurial</application> to use the certificates,
259 as the <systemitem class="username">root</systemitem> user, issue:
260 </para>
261
262<screen role="root"><userinput>install -v -d -m755 /etc/mercurial &amp;&amp;
263cat &gt; /etc/mercurial/hgrc &lt;&lt; "EOF"
264<literal>[web]
265cacerts = /etc/pki/tls/certs/ca-bundle.crt</literal>
266EOF</userinput></screen>
267
268 </sect3>
269
270 </sect2>
271
272 <sect2 role="content">
273 <title>Contents</title>
274
275 <segmentedlist>
276 <segtitle>Installed Programs</segtitle>
277 <segtitle>Installed Libraries</segtitle>
278 <segtitle>Installed Directories</segtitle>
279
280 <seglistitem>
281 <seg>
282 hg
283 </seg>
284 <seg>
285 several internal modules under
286 /usr/lib/python&python3-majorver;/site-packages/mercurial
287 </seg>
288 <seg>
289 /etc/mercurial,
290 /usr/lib/python&python3-majorver;/site-packages/hgdemandimport,
291 /usr/lib/python&python3-majorver;/site-packages/hgext,
292 /usr/lib/python&python3-majorver;/site-packages/hgext3rd,
293 /usr/lib/python&python3-majorver;/site-packages/mercurial, and
294 /usr/lib/python&python3-majorver;/site-packages/mercurial-&mercurial-version;-py&python3-majorver;.egg-info
295 </seg>
296 </seglistitem>
297 </segmentedlist>
298
299 <variablelist>
300 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
301 <?dbfo list-presentation="list"?>
302 <?dbhtml list-presentation="table"?>
303
304 <varlistentry id="hg">
305 <term><command>hg</command></term>
306 <listitem>
307 <para>
308 is the mercurial version control system
309 </para>
310 <indexterm zone="mercurial hg">
311 <primary sortas="b-hg">hg</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 </variablelist>
317
318 </sect2>
319
320</sect1>
Note: See TracBrowser for help on using the repository browser.