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 "http://mercurial.selenic.com/release/mercurial-&mercurial-version;.tar.gz">
|
---|
8 | <!ENTITY mercurial-download-ftp " ">
|
---|
9 | <!ENTITY mercurial-md5sum "25b6065487842a7851ba8cfcaa704b1f">
|
---|
10 | <!ENTITY mercurial-size "4.4 MB">
|
---|
11 | <!ENTITY mercurial-buildsize "52 MB (with documentation, additional 297 MB for tests)">
|
---|
12 | <!ENTITY mercurial-time "less than 0.1 SBU (with documentation, additional 3.1 SBU for tests, using -j8)">
|
---|
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. If there are failures, e.g.
|
---|
102 | test-parse-date.t, those tests can be disabled. To test the results in the
|
---|
103 | subdiretory <filename class="directory">tests/tmp</filename>, skipping
|
---|
104 | failing tests, issue:</para>
|
---|
105 |
|
---|
106 | <screen><userinput>cat > tests/blacklists/failed-tests << "EOF"
|
---|
107 | <literal># Test Failures
|
---|
108 | test-convert-svn-source.t
|
---|
109 | test-convert-hg-svn.t
|
---|
110 | test-largefiles-update.t
|
---|
111 | test-gpg.t</literal>
|
---|
112 | EOF
|
---|
113 | rm -rf tests/tmp &&
|
---|
114 | TESTFLAGS="-j<replaceable><N></replaceable> --tmpdir tmp --blacklist blacklists/failed-tests" \
|
---|
115 | make check</userinput></screen>
|
---|
116 |
|
---|
117 | <para>where <replaceable><N></replaceable> is an integer between one
|
---|
118 | and the number of processor threads, inclusive. In order to investigate a
|
---|
119 | particular apparently failing test, e.g <quote>test-parse-date.t</quote>,
|
---|
120 | issue the following commands (notice that omitting <option>--debug</option>
|
---|
121 | sometimes modifies the result):</para>
|
---|
122 |
|
---|
123 | <screen><userinput>pushd tests &&
|
---|
124 | rm -rf tmp &&
|
---|
125 | ./run-tests.py --debug --tmpdir tmp test-parse-date.t &&
|
---|
126 | popd</userinput></screen>
|
---|
127 |
|
---|
128 | <para>Install <application>Mercurial</application> by running the following
|
---|
129 | command (as <systemitem class="username">root</systemitem>):</para>
|
---|
130 |
|
---|
131 | <screen role="root"><userinput>make PREFIX=/usr install-bin</userinput></screen>
|
---|
132 |
|
---|
133 | <para>If you built the documentation, install it by running the following
|
---|
134 | command (as <systemitem class="username">root</systemitem>):</para>
|
---|
135 |
|
---|
136 | <screen role="root"><userinput>make PREFIX=/usr install-doc</userinput></screen>
|
---|
137 |
|
---|
138 | <para>After installed, two very quick and simple tests should run correctly.
|
---|
139 | First one needs some configuration:</para>
|
---|
140 |
|
---|
141 | <screen><userinput>cat >> ~/.hgrc << "EOF"
|
---|
142 | <literal>[ui]
|
---|
143 | username = <user_name> <your@mail></literal>
|
---|
144 | EOF</userinput></screen>
|
---|
145 |
|
---|
146 | <para>where you must replace <user_name> and <your@mail> (mail
|
---|
147 | is optional and can be omitted). With the user identity defined, run
|
---|
148 | <command>hg debuginstall</command> and several lines will be displayed,
|
---|
149 | the last one reading "no problems detected". Another quick and simple test
|
---|
150 | is just <command>hg</command>, which should output basic commands that can
|
---|
151 | be used with <command>hg</command>.</para>
|
---|
152 |
|
---|
153 | </sect2>
|
---|
154 |
|
---|
155 | <sect2 role="configuration">
|
---|
156 | <title>Configuring Mercurial</title>
|
---|
157 |
|
---|
158 | <sect3 id="mercurial-config">
|
---|
159 | <title>Config Files</title>
|
---|
160 |
|
---|
161 | <para>
|
---|
162 | <filename>/etc/mercurial/hgrc</filename>
|
---|
163 | </para>
|
---|
164 |
|
---|
165 | <indexterm zone="mercurial mercurial-config">
|
---|
166 | <primary sortas="e-etc-mercurial-hgrc">/etc/mercurial/hgrc</primary>
|
---|
167 | </indexterm>
|
---|
168 |
|
---|
169 | <para>
|
---|
170 | If you have installed the <xref linkend="cacerts"/> and you want
|
---|
171 | <application>Mercurial</application> to use them, as the
|
---|
172 | <systemitem class="username">root</systemitem> user:
|
---|
173 | </para>
|
---|
174 |
|
---|
175 | <screen role="root"><userinput>install -v -d -m755 /etc/mercurial &&
|
---|
176 | cat > /etc/mercurial/hgrc << "EOF"
|
---|
177 | <literal>[web]
|
---|
178 | cacerts = /etc/ssl/ca-bundle.crt</literal>
|
---|
179 | EOF</userinput></screen>
|
---|
180 |
|
---|
181 | </sect3>
|
---|
182 |
|
---|
183 | </sect2>
|
---|
184 |
|
---|
185 | <sect2 role="content">
|
---|
186 | <title>Contents</title>
|
---|
187 |
|
---|
188 | <segmentedlist>
|
---|
189 | <segtitle>Installed Programs</segtitle>
|
---|
190 | <segtitle>Installed Libraries</segtitle>
|
---|
191 | <segtitle>Installed Directories</segtitle>
|
---|
192 |
|
---|
193 | <seglistitem>
|
---|
194 | <seg>
|
---|
195 | hg
|
---|
196 | </seg>
|
---|
197 | <seg>
|
---|
198 | several internal modules under
|
---|
199 | /usr/lib/python&python2-majorver;/site-packages/mercurial
|
---|
200 | </seg>
|
---|
201 | <seg>
|
---|
202 | /etc/mercurial and
|
---|
203 | /usr/lib/python&python2-majorver;/site-packages/{hgext,mercurial}
|
---|
204 | </seg>
|
---|
205 | </seglistitem>
|
---|
206 | </segmentedlist>
|
---|
207 |
|
---|
208 | <variablelist>
|
---|
209 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
210 | <?dbfo list-presentation="list"?>
|
---|
211 | <?dbhtml list-presentation="table"?>
|
---|
212 |
|
---|
213 | <varlistentry id="hg">
|
---|
214 | <term><command>hg</command></term>
|
---|
215 | <listitem>
|
---|
216 | <para>is the program file for mercurial.</para>
|
---|
217 | <indexterm zone="mercurial hg">
|
---|
218 | <primary sortas="b-hg">hg</primary>
|
---|
219 | </indexterm>
|
---|
220 | </listitem>
|
---|
221 | </varlistentry>
|
---|
222 |
|
---|
223 | </variablelist>
|
---|
224 |
|
---|
225 | </sect2>
|
---|
226 |
|
---|
227 | </sect1>
|
---|