source: general/prog/mercurial.xml@ d7bee48

systemd-13485
Last change on this file since d7bee48 was d7bee48, checked in by Douglas R. Reno <renodr@…>, 8 years ago

Sync to trunk r17332

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@17335 af4574ff-66df-0310-9fd7-8a98e5e911e0

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