Debian Codegraph @

doc/html/topic-config.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>Configuration Files</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="configuration-files">
12 <span id="topic-config"></span>
13 <h1 class="title">Configuration Files</h1>
14
15 <div class="contents htmlonly topic" id="contents">
16 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
17 <ul class="simple">
18 <li><a class="reference internal" href="#troubleshooting" id="toc-entry-1">Troubleshooting</a></li>
19 <li><a class="reference internal" href="#structure" id="toc-entry-2">Structure</a></li>
20 <li><a class="reference internal" href="#files" id="toc-entry-3">Files</a></li>
21 <li><a class="reference internal" href="#syntax" id="toc-entry-4">Syntax</a></li>
22 <li><a class="reference internal" href="#sections" id="toc-entry-5">Sections</a><ul>
23 <li><a class="reference internal" href="#alias" id="toc-entry-6"><tt class="docutils literal">alias</tt></a></li>
24 <li><a class="reference internal" href="#annotate" id="toc-entry-7"><tt class="docutils literal">annotate</tt></a></li>
25 <li><a class="reference internal" href="#auth" id="toc-entry-8"><tt class="docutils literal">auth</tt></a></li>
26 <li><a class="reference internal" href="#censor" id="toc-entry-9"><tt class="docutils literal">censor</tt></a></li>
27 <li><a class="reference internal" href="#cmdserver" id="toc-entry-10"><tt class="docutils literal">cmdserver</tt></a></li>
28 <li><a class="reference internal" href="#color" id="toc-entry-11"><tt class="docutils literal">color</tt></a></li>
29 <li><a class="reference internal" href="#commands" id="toc-entry-12"><tt class="docutils literal">commands</tt></a></li>
30 <li><a class="reference internal" href="#committemplate" id="toc-entry-13"><tt class="docutils literal">committemplate</tt></a></li>
31 <li><a class="reference internal" href="#decode-encode" id="toc-entry-14"><tt class="docutils literal">decode/encode</tt></a></li>
32 <li><a class="reference internal" href="#defaults" id="toc-entry-15"><tt class="docutils literal">defaults</tt></a></li>
33 <li><a class="reference internal" href="#diff" id="toc-entry-16"><tt class="docutils literal">diff</tt></a></li>
34 <li><a class="reference internal" href="#email" id="toc-entry-17"><tt class="docutils literal">email</tt></a></li>
35 <li><a class="reference internal" href="#extensions" id="toc-entry-18"><tt class="docutils literal">extensions</tt></a></li>
36 <li><a class="reference internal" href="#format" id="toc-entry-19"><tt class="docutils literal">format</tt></a></li>
37 <li><a class="reference internal" href="#graph" id="toc-entry-20"><tt class="docutils literal">graph</tt></a></li>
38 <li><a class="reference internal" href="#hooks" id="toc-entry-21"><tt class="docutils literal">hooks</tt></a></li>
39 <li><a class="reference internal" href="#hostfingerprints" id="toc-entry-22"><tt class="docutils literal">hostfingerprints</tt></a></li>
40 <li><a class="reference internal" href="#hostsecurity" id="toc-entry-23"><tt class="docutils literal">hostsecurity</tt></a></li>
41 <li><a class="reference internal" href="#http-proxy" id="toc-entry-24"><tt class="docutils literal">http_proxy</tt></a></li>
42 <li><a class="reference internal" href="#http" id="toc-entry-25"><tt class="docutils literal">http</tt></a></li>
43 <li><a class="reference internal" href="#merge" id="toc-entry-26"><tt class="docutils literal">merge</tt></a></li>
44 <li><a class="reference internal" href="#merge-patterns" id="toc-entry-27"><tt class="docutils literal"><span class="pre">merge-patterns</span></tt></a></li>
45 <li><a class="reference internal" href="#merge-tools" id="toc-entry-28"><tt class="docutils literal"><span class="pre">merge-tools</span></tt></a></li>
46 <li><a class="reference internal" href="#pager" id="toc-entry-29"><tt class="docutils literal">pager</tt></a></li>
47 <li><a class="reference internal" href="#patch" id="toc-entry-30"><tt class="docutils literal">patch</tt></a></li>
48 <li><a class="reference internal" href="#paths" id="toc-entry-31"><tt class="docutils literal">paths</tt></a></li>
49 <li><a class="reference internal" href="#phases" id="toc-entry-32"><tt class="docutils literal">phases</tt></a></li>
50 <li><a class="reference internal" href="#profiling" id="toc-entry-33"><tt class="docutils literal">profiling</tt></a></li>
51 <li><a class="reference internal" href="#progress" id="toc-entry-34"><tt class="docutils literal">progress</tt></a></li>
52 <li><a class="reference internal" href="#rebase" id="toc-entry-35"><tt class="docutils literal">rebase</tt></a></li>
53 <li><a class="reference internal" href="#revsetalias" id="toc-entry-36"><tt class="docutils literal">revsetalias</tt></a></li>
54 <li><a class="reference internal" href="#rewrite" id="toc-entry-37"><tt class="docutils literal">rewrite</tt></a></li>
55 <li><a class="reference internal" href="#rhg" id="toc-entry-38"><tt class="docutils literal">rhg</tt></a></li>
56 <li><a class="reference internal" href="#share" id="toc-entry-39"><tt class="docutils literal">share</tt></a></li>
57 <li><a class="reference internal" href="#storage" id="toc-entry-40"><tt class="docutils literal">storage</tt></a></li>
58 <li><a class="reference internal" href="#server" id="toc-entry-41"><tt class="docutils literal">server</tt></a></li>
59 <li><a class="reference internal" href="#smtp" id="toc-entry-42"><tt class="docutils literal">smtp</tt></a></li>
60 <li><a class="reference internal" href="#subpaths" id="toc-entry-43"><tt class="docutils literal">subpaths</tt></a></li>
61 <li><a class="reference internal" href="#subrepos" id="toc-entry-44"><tt class="docutils literal">subrepos</tt></a></li>
62 <li><a class="reference internal" href="#templatealias" id="toc-entry-45"><tt class="docutils literal">templatealias</tt></a></li>
63 <li><a class="reference internal" href="#templates" id="toc-entry-46"><tt class="docutils literal">templates</tt></a></li>
64 <li><a class="reference internal" href="#trusted" id="toc-entry-47"><tt class="docutils literal">trusted</tt></a></li>
65 <li><a class="reference internal" href="#ui" id="toc-entry-48"><tt class="docutils literal">ui</tt></a></li>
66 <li><a class="reference internal" href="#usage" id="toc-entry-49"><tt class="docutils literal">usage</tt></a></li>
67 <li><a class="reference internal" href="#command-templates" id="toc-entry-50"><tt class="docutils literal"><span class="pre">command-templates</span></tt></a></li>
68 <li><a class="reference internal" href="#web" id="toc-entry-51"><tt class="docutils literal">web</tt></a></li>
69 <li><a class="reference internal" href="#websub" id="toc-entry-52"><tt class="docutils literal">websub</tt></a></li>
70 <li><a class="reference internal" href="#worker" id="toc-entry-53"><tt class="docutils literal">worker</tt></a></li>
71 </ul>
72 </li>
73 </ul>
74 </div>
75 <p id="hgrc"><span id="config"></span>The Mercurial system uses a set of configuration files to control
76 aspects of its behavior.</p>
77 <div class="section" id="troubleshooting">
78 <h1><a class="toc-backref" href="#contents">Troubleshooting</a></h1>
79 <p>If you're having problems with your configuration,
80 <a class="reference external" href="hg-config.html"><tt class="docutils literal">hg config <span class="pre">--source</span></tt></a> can help you understand what is introducing
81 a setting into your environment.</p>
82 <p>See <a class="reference external" href="hgrc.5.html#syntax"><tt class="docutils literal">hg help config.syntax</tt></a> and <a class="reference external" href="hgrc.5.html#files"><tt class="docutils literal">hg help config.files</tt></a>
83 for information about how and where to override things.</p>
84 </div>
85 <div class="section" id="structure">
86 <h1><a class="toc-backref" href="#contents">Structure</a></h1>
87 <p>The configuration files use a simple ini-file format. A configuration
88 file consists of sections, led by a <tt class="docutils literal">[section]</tt> header and followed
89 by <tt class="docutils literal">name = value</tt> entries:</p>
90 <pre class="literal-block">
91 [ui]
92 username = Firstname Lastname &lt;firstname.lastname&#64;example.net&gt;
93 verbose = True
94 </pre>
95 <p>The above entries will be referred to as <tt class="docutils literal">ui.username</tt> and
96 <tt class="docutils literal">ui.verbose</tt>, respectively. See <a class="reference external" href="hgrc.5.html#syntax"><tt class="docutils literal">hg help config.syntax</tt></a>.</p>
97 </div>
98 <div class="section" id="files">
99 <h1><a class="toc-backref" href="#contents">Files</a></h1>
100 <p>Mercurial reads configuration data from several files, if they exist.
101 These files do not exist by default and you will have to create the
102 appropriate configuration files yourself:</p>
103 <p>Local configuration is put into the per-repository <tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc</span></tt> file.</p>
104 <p>Global configuration like the username setting is typically put into:</p>
105 <div class="windows docutils container">
106 <ul class="simple">
107 <li><tt class="docutils literal"><span class="pre">%USERPROFILE%\mercurial.ini</span></tt> (on Windows)</li>
108 </ul>
109 </div>
110 <div class="unix-plan9 docutils container">
111 <ul class="simple">
112 <li><tt class="docutils literal"><span class="pre">$HOME/.hgrc</span></tt> (on Unix, Plan9)</li>
113 </ul>
114 </div>
115 <p>The names of these files depend on the system on which Mercurial is
116 installed. <tt class="docutils literal">*.rc</tt> files from a single directory are read in
117 alphabetical order, later ones overriding earlier ones. Where multiple
118 paths are given below, settings from earlier paths override later
119 ones.</p>
120 <div class="verbose-unix docutils container">
121 <p>On Unix, the following files are consulted:</p>
122 <ul class="simple">
123 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc-not-shared</span></tt> (per-repository)</li>
124 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc</span></tt> (per-repository)</li>
125 <li><tt class="docutils literal"><span class="pre">$HOME/.hgrc</span></tt> (per-user)</li>
126 <li><tt class="docutils literal"><span class="pre">${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc</span></tt> (per-user)</li>
127 <li><tt class="docutils literal"><span class="pre">&lt;install-root&gt;/etc/mercurial/hgrc</span></tt> (per-installation)</li>
128 <li><tt class="docutils literal"><span class="pre">&lt;install-root&gt;/etc/mercurial/hgrc.d/*.rc</span></tt> (per-installation)</li>
129 <li><tt class="docutils literal">/etc/mercurial/hgrc</tt> (per-system)</li>
130 <li><tt class="docutils literal"><span class="pre">/etc/mercurial/hgrc.d/*.rc</span></tt> (per-system)</li>
131 <li><tt class="docutils literal"><span class="pre">&lt;internal&gt;/*.rc</span></tt> (defaults)</li>
132 </ul>
133 </div>
134 <div class="verbose-windows docutils container">
135 <p>On Windows, the following files are consulted:</p>
136 <ul class="simple">
137 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc-not-shared</span></tt> (per-repository)</li>
138 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc</span></tt> (per-repository)</li>
139 <li><tt class="docutils literal"><span class="pre">%USERPROFILE%\.hgrc</span></tt> (per-user)</li>
140 <li><tt class="docutils literal"><span class="pre">%USERPROFILE%\Mercurial.ini</span></tt> (per-user)</li>
141 <li><tt class="docutils literal"><span class="pre">%HOME%\.hgrc</span></tt> (per-user)</li>
142 <li><tt class="docutils literal"><span class="pre">%HOME%\Mercurial.ini</span></tt> (per-user)</li>
143 <li><tt class="docutils literal">HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial</tt> (per-system)</li>
144 <li><tt class="docutils literal"><span class="pre">&lt;install-dir&gt;\hgrc.d\*.rc</span></tt> (per-installation)</li>
145 <li><tt class="docutils literal"><span class="pre">&lt;install-dir&gt;\Mercurial.ini</span></tt> (per-installation)</li>
146 <li><tt class="docutils literal"><span class="pre">%PROGRAMDATA%\Mercurial\hgrc</span></tt> (per-system)</li>
147 <li><tt class="docutils literal"><span class="pre">%PROGRAMDATA%\Mercurial\Mercurial.ini</span></tt> (per-system)</li>
148 <li><tt class="docutils literal"><span class="pre">%PROGRAMDATA%\Mercurial\hgrc.d\*.rc</span></tt> (per-system)</li>
149 <li><tt class="docutils literal"><span class="pre">&lt;internal&gt;/*.rc</span></tt> (defaults)</li>
150 </ul>
151 <div class="admonition note">
152 <p class="first admonition-title">Note</p>
153 <p class="last">The registry key <tt class="docutils literal">HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial</tt>
154 is used when running 32-bit Python on 64-bit Windows.</p>
155 </div>
156 </div>
157 <div class="verbose-plan9 docutils container">
158 <p>On Plan9, the following files are consulted:</p>
159 <ul class="simple">
160 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc-not-shared</span></tt> (per-repository)</li>
161 <li><tt class="docutils literal"><span class="pre">&lt;repo&gt;/.hg/hgrc</span></tt> (per-repository)</li>
162 <li><tt class="docutils literal">$home/lib/hgrc</tt> (per-user)</li>
163 <li><tt class="docutils literal"><span class="pre">&lt;install-root&gt;/lib/mercurial/hgrc</span></tt> (per-installation)</li>
164 <li><tt class="docutils literal"><span class="pre">&lt;install-root&gt;/lib/mercurial/hgrc.d/*.rc</span></tt> (per-installation)</li>
165 <li><tt class="docutils literal">/lib/mercurial/hgrc</tt> (per-system)</li>
166 <li><tt class="docutils literal"><span class="pre">/lib/mercurial/hgrc.d/*.rc</span></tt> (per-system)</li>
167 <li><tt class="docutils literal"><span class="pre">&lt;internal&gt;/*.rc</span></tt> (defaults)</li>
168 </ul>
169 </div>
170 <p>Per-repository configuration options only apply in a
171 particular repository. This file is not version-controlled, and
172 will not get transferred during a &quot;clone&quot; operation. Options in
173 this file override options in all other configuration files.</p>
174 <div class="unix-plan9 docutils container">
175 On Plan 9 and Unix, most of this file will be ignored if it doesn't
176 belong to a trusted user or to a trusted group. See
177 <a class="reference external" href="hgrc.5.html#trusted"><tt class="docutils literal">hg help config.trusted</tt></a> for more details.</div>
178 <p>Per-user configuration file(s) are for the user running Mercurial. Options
179 in these files apply to all Mercurial commands executed by this user in any
180 directory. Options in these files override per-system and per-installation
181 options.</p>
182 <p>Per-installation configuration files are searched for in the
183 directory where Mercurial is installed. <tt class="docutils literal"><span class="pre">&lt;install-root&gt;</span></tt> is the
184 parent directory of the <strong>hg</strong> executable (or symlink) being run.</p>
185 <div class="unix-plan9 docutils container">
186 For example, if installed in <tt class="docutils literal">/shared/tools/bin/hg</tt>, Mercurial
187 will look in <tt class="docutils literal">/shared/tools/etc/mercurial/hgrc</tt>. Options in these
188 files apply to all Mercurial commands executed by any user in any
189 directory.</div>
190 <p>Per-installation configuration files are for the system on
191 which Mercurial is running. Options in these files apply to all
192 Mercurial commands executed by any user in any directory. Registry
193 keys contain PATH-like strings, every part of which must reference
194 a <tt class="docutils literal">Mercurial.ini</tt> file or be a directory where <tt class="docutils literal">*.rc</tt> files will
195 be read. Mercurial checks each of these locations in the specified
196 order until one or more configuration files are detected.</p>
197 <p>Per-system configuration files are for the system on which Mercurial
198 is running. Options in these files apply to all Mercurial commands
199 executed by any user in any directory. Options in these files
200 override per-installation options.</p>
201 <p>Mercurial comes with some default configuration. The default configuration
202 files are installed with Mercurial and will be overwritten on upgrades. Default
203 configuration files should never be edited by users or administrators but can
204 be overridden in other configuration files. So far the directory only contains
205 merge tool configuration but packagers can also put other default configuration
206 there.</p>
207 <p>On versions 5.7 and later, if share-safe functionality is enabled,
208 shares will read config file of share source too.
209 <cite>&lt;share-source/.hg/hgrc&gt;</cite> is read before reading <cite>&lt;repo/.hg/hgrc&gt;</cite>.</p>
210 <p>For configs which should not be shared, <cite>&lt;repo/.hg/hgrc-not-shared&gt;</cite>
211 should be used.</p>
212 </div>
213 <div class="section" id="syntax">
214 <h1><a class="toc-backref" href="#contents">Syntax</a></h1>
215 <p>A configuration file consists of sections, led by a <tt class="docutils literal">[section]</tt> header
216 and followed by <tt class="docutils literal">name = value</tt> entries (sometimes called
217 <tt class="docutils literal">configuration keys</tt>):</p>
218 <pre class="literal-block">
219 [spam]
220 eggs=ham
221 green=
222 eggs
223 </pre>
224 <p>Each line contains one entry. If the lines that follow are indented,
225 they are treated as continuations of that entry. Leading whitespace is
226 removed from values. Empty lines are skipped. Lines beginning with
227 <tt class="docutils literal">#</tt> or <tt class="docutils literal">;</tt> are ignored and may be used to provide comments.</p>
228 <p>Configuration keys can be set multiple times, in which case Mercurial
229 will use the value that was configured last. As an example:</p>
230 <pre class="literal-block">
231 [spam]
232 eggs=large
233 ham=serrano
234 eggs=small
235 </pre>
236 <p>This would set the configuration key named <tt class="docutils literal">eggs</tt> to <tt class="docutils literal">small</tt>.</p>
237 <p>It is also possible to define a section multiple times. A section can
238 be redefined on the same and/or on different configuration files. For
239 example:</p>
240 <pre class="literal-block">
241 [foo]
242 eggs=large
243 ham=serrano
244 eggs=small
245
246 [bar]
247 eggs=ham
248 green=
249 eggs
250
251 [foo]
252 ham=prosciutto
253 eggs=medium
254 bread=toasted
255 </pre>
256 <p>This would set the <tt class="docutils literal">eggs</tt>, <tt class="docutils literal">ham</tt>, and <tt class="docutils literal">bread</tt> configuration keys
257 of the <tt class="docutils literal">foo</tt> section to <tt class="docutils literal">medium</tt>, <tt class="docutils literal">prosciutto</tt>, and <tt class="docutils literal">toasted</tt>,
258 respectively. As you can see there only thing that matters is the last
259 value that was set for each of the configuration keys.</p>
260 <p>If a configuration key is set multiple times in different
261 configuration files the final value will depend on the order in which
262 the different configuration files are read, with settings from earlier
263 paths overriding later ones as described on the <tt class="docutils literal">Files</tt> section
264 above.</p>
265 <p>A line of the form <tt class="docutils literal">%include file</tt> will include <tt class="docutils literal">file</tt> into the
266 current configuration file. The inclusion is recursive, which means
267 that included files can include other files. Filenames are relative to
268 the configuration file in which the <tt class="docutils literal">%include</tt> directive is found.
269 Environment variables and <tt class="docutils literal">~user</tt> constructs are expanded in
270 <tt class="docutils literal">file</tt>. This lets you do something like:</p>
271 <pre class="literal-block">
272 %include ~/.hgrc.d/$HOST.rc
273 </pre>
274 <p>to include a different configuration file on each computer you use.</p>
275 <p>A line with <tt class="docutils literal">%unset name</tt> will remove <tt class="docutils literal">name</tt> from the current
276 section, if it has been set previously.</p>
277 <p>The values are either free-form text strings, lists of text strings,
278 or Boolean values. Boolean values can be set to true using any of &quot;1&quot;,
279 &quot;yes&quot;, &quot;true&quot;, or &quot;on&quot; and to false using &quot;0&quot;, &quot;no&quot;, &quot;false&quot;, or &quot;off&quot;
280 (all case insensitive).</p>
281 <p>List values are separated by whitespace or comma, except when values are
282 placed in double quotation marks:</p>
283 <pre class="literal-block">
284 allow_read = &quot;John Doe, PhD&quot;, brian, betty
285 </pre>
286 <p>Quotation marks can be escaped by prefixing them with a backslash. Only
287 quotation marks at the beginning of a word is counted as a quotation
288 (e.g., <tt class="docutils literal">foo&quot;bar baz</tt> is the list of <tt class="docutils literal">foo&quot;bar</tt> and <tt class="docutils literal">baz</tt>).</p>
289 </div>
290 <div class="section" id="sections">
291 <h1><a class="toc-backref" href="#contents">Sections</a></h1>
292 <p>This section describes the different sections that may appear in a
293 Mercurial configuration file, the purpose of each section, its possible
294 keys, and their possible values.</p>
295 <div class="section" id="alias">
296 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">alias</tt></a></h2>
297 <p>Defines command aliases.</p>
298 <p>Aliases allow you to define your own commands in terms of other
299 commands (or aliases), optionally including arguments. Positional
300 arguments in the form of <tt class="docutils literal">$1</tt>, <tt class="docutils literal">$2</tt>, etc. in the alias definition
301 are expanded by Mercurial before execution. Positional arguments not
302 already used by <tt class="docutils literal">$N</tt> in the definition are put at the end of the
303 command to be executed.</p>
304 <p>Alias definitions consist of lines of the form:</p>
305 <pre class="literal-block">
306 &lt;alias&gt; = &lt;command&gt; [&lt;argument&gt;]...
307 </pre>
308 <p>For example, this definition:</p>
309 <pre class="literal-block">
310 latest = log --limit 5
311 </pre>
312 <p>creates a new command <tt class="docutils literal">latest</tt> that shows only the five most recent
313 changesets. You can define subsequent aliases using earlier ones:</p>
314 <pre class="literal-block">
315 stable5 = latest -b stable
316 </pre>
317 <div class="admonition note">
318 <p class="first admonition-title">Note</p>
319 <p class="last">It is possible to create aliases with the same names as
320 existing commands, which will then override the original
321 definitions. This is almost always a bad idea!</p>
322 </div>
323 <p>An alias can start with an exclamation point (<tt class="docutils literal">!</tt>) to make it a
324 shell alias. A shell alias is executed with the shell and will let you
325 run arbitrary commands. As an example,</p>
326 <pre class="literal-block">
327 echo = !echo $&#64;
328 </pre>
329 <p>will let you do <tt class="docutils literal">hg echo foo</tt> to have <tt class="docutils literal">foo</tt> printed in your
330 terminal. A better example might be:</p>
331 <pre class="literal-block">
332 purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f
333 </pre>
334 <p>which will make <tt class="docutils literal">hg purge</tt> delete all unknown files in the
335 repository in the same manner as the purge extension.</p>
336 <p>Positional arguments like <tt class="docutils literal">$1</tt>, <tt class="docutils literal">$2</tt>, etc. in the alias definition
337 expand to the command arguments. Unmatched arguments are
338 removed. <tt class="docutils literal">$0</tt> expands to the alias name and <tt class="docutils literal">$&#64;</tt> expands to all
339 arguments separated by a space. <tt class="docutils literal"><span class="pre">&quot;$&#64;&quot;</span></tt> (with quotes) expands to all
340 arguments quoted individually and separated by a space. These expansions
341 happen before the command is passed to the shell.</p>
342 <p>Shell aliases are executed in an environment where <tt class="docutils literal">$HG</tt> expands to
343 the path of the Mercurial that was used to execute the alias. This is
344 useful when you want to call further Mercurial commands in a shell
345 alias, as was done above for the purge alias. In addition,
346 <tt class="docutils literal">$HG_ARGS</tt> expands to the arguments given to Mercurial. In the <tt class="docutils literal">hg
347 echo foo</tt> call above, <tt class="docutils literal">$HG_ARGS</tt> would expand to <tt class="docutils literal">echo foo</tt>.</p>
348 <div class="admonition note">
349 <p class="first admonition-title">Note</p>
350 <p class="last">Some global configuration options such as <tt class="docutils literal"><span class="pre">-R</span></tt> are
351 processed before shell aliases and will thus not be passed to
352 aliases.</p>
353 </div>
354 </div>
355 <div class="section" id="annotate">
356 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">annotate</tt></a></h2>
357 <p>Settings used when displaying file annotations. All values are
358 Booleans and default to False. See <a class="reference external" href="hgrc.5.html#diff"><tt class="docutils literal">hg help config.diff</tt></a> for
359 related options for the diff command.</p>
360 <dl class="docutils">
361 <dt><tt class="docutils literal">ignorews</tt></dt>
362 <dd>Ignore white space when comparing lines.</dd>
363 <dt><tt class="docutils literal">ignorewseol</tt></dt>
364 <dd>Ignore white space at the end of a line when comparing lines.</dd>
365 <dt><tt class="docutils literal">ignorewsamount</tt></dt>
366 <dd>Ignore changes in the amount of white space.</dd>
367 <dt><tt class="docutils literal">ignoreblanklines</tt></dt>
368 <dd>Ignore changes whose lines are all blank.</dd>
369 </dl>
370 </div>
371 <div class="section" id="auth">
372 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">auth</tt></a></h2>
373 <p>Authentication credentials and other authentication-like configuration
374 for HTTP connections. This section allows you to store usernames and
375 passwords for use when logging <em>into</em> HTTP servers. See
376 <a class="reference external" href="hgrc.5.html#web"><tt class="docutils literal">hg help config.web</tt></a> if you want to configure <em>who</em> can login to
377 your HTTP server.</p>
378 <p>The following options apply to all hosts.</p>
379 <dl class="docutils">
380 <dt><tt class="docutils literal">cookiefile</tt></dt>
381 <dd><p class="first">Path to a file containing HTTP cookie lines. Cookies matching a
382 host will be sent automatically.</p>
383 <p>The file format uses the Mozilla cookies.txt format, which defines cookies
384 on their own lines. Each line contains 7 fields delimited by the tab
385 character (domain, is_domain_cookie, path, is_secure, expires, name,
386 value). For more info, do an Internet search for &quot;Netscape cookies.txt
387 format.&quot;</p>
388 <p>Note: the cookies parser does not handle port numbers on domains. You
389 will need to remove ports from the domain for the cookie to be recognized.
390 This could result in a cookie being disclosed to an unwanted server.</p>
391 <p class="last">The cookies file is read-only.</p>
392 </dd>
393 </dl>
394 <p>Other options in this section are grouped by name and have the following
395 format:</p>
396 <pre class="literal-block">
397 &lt;name&gt;.&lt;argument&gt; = &lt;value&gt;
398 </pre>
399 <p>where <tt class="docutils literal">&lt;name&gt;</tt> is used to group arguments into authentication
400 entries. Example:</p>
401 <pre class="literal-block">
402 foo.prefix = hg.intevation.de/mercurial
403 foo.username = foo
404 foo.password = bar
405 foo.schemes = http https
406
407 bar.prefix = secure.example.org
408 bar.key = path/to/file.key
409 bar.cert = path/to/file.cert
410 bar.schemes = https
411 </pre>
412 <p>Supported arguments:</p>
413 <dl class="docutils">
414 <dt><tt class="docutils literal">prefix</tt></dt>
415 <dd>Either <tt class="docutils literal">*</tt> or a URI prefix with or without the scheme part.
416 The authentication entry with the longest matching prefix is used
417 (where <tt class="docutils literal">*</tt> matches everything and counts as a match of length
418 1). If the prefix doesn't include a scheme, the match is performed
419 against the URI with its scheme stripped as well, and the schemes
420 argument, q.v., is then subsequently consulted.</dd>
421 <dt><tt class="docutils literal">username</tt></dt>
422 <dd>Optional. Username to authenticate with. If not given, and the
423 remote site requires basic or digest authentication, the user will
424 be prompted for it. Environment variables are expanded in the
425 username letting you do <tt class="docutils literal">foo.username = $USER</tt>. If the URI
426 includes a username, only <tt class="docutils literal">[auth]</tt> entries with a matching
427 username or without a username will be considered.</dd>
428 <dt><tt class="docutils literal">password</tt></dt>
429 <dd>Optional. Password to authenticate with. If not given, and the
430 remote site requires basic or digest authentication, the user
431 will be prompted for it.</dd>
432 <dt><tt class="docutils literal">key</tt></dt>
433 <dd>Optional. PEM encoded client certificate key file. Environment
434 variables are expanded in the filename.</dd>
435 <dt><tt class="docutils literal">cert</tt></dt>
436 <dd>Optional. PEM encoded client certificate chain file. Environment
437 variables are expanded in the filename.</dd>
438 <dt><tt class="docutils literal">schemes</tt></dt>
439 <dd>Optional. Space separated list of URI schemes to use this
440 authentication entry with. Only used if the prefix doesn't include
441 a scheme. Supported schemes are http and https. They will match
442 static-http and static-https respectively, as well.
443 (default: https)</dd>
444 </dl>
445 <p>If no suitable authentication entry is found, the user is prompted
446 for credentials as usual if required by the remote.</p>
447 </div>
448 <div class="section" id="censor">
449 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">censor</tt></a></h2>
450 <dl class="docutils">
451 <dt><tt class="docutils literal">policy</tt></dt>
452 <dd><p class="first">Control how to react when accessing censored content.
453 Accepted value: &quot;abort&quot;, &quot;ignore&quot;. Defaults to abort.</p>
454 <p class="last">A few informative commands such as <tt class="docutils literal">hg grep</tt> will unconditionally ignore
455 censored data and merely report that it was encountered.</p>
456 </dd>
457 </dl>
458 </div>
459 <div class="section" id="cmdserver">
460 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">cmdserver</tt></a></h2>
461 <p>Controls command server settings. (ADVANCED)</p>
462 <dl class="docutils">
463 <dt><tt class="docutils literal"><span class="pre">message-encodings</span></tt></dt>
464 <dd>List of encodings for the <tt class="docutils literal">m</tt> (message) channel. The first encoding
465 supported by the server will be selected and advertised in the hello
466 message. This is useful only when <tt class="docutils literal"><span class="pre">ui.message-output</span></tt> is set to
467 <tt class="docutils literal">channel</tt>. Supported encodings are <tt class="docutils literal">cbor</tt>.</dd>
468 <dt><tt class="docutils literal"><span class="pre">shutdown-on-interrupt</span></tt></dt>
469 <dd>If set to false, the server's main loop will continue running after
470 SIGINT received. <tt class="docutils literal">runcommand</tt> requests can still be interrupted by
471 SIGINT. Close the write end of the pipe to shut down the server
472 process gracefully.
473 (default: True)</dd>
474 </dl>
475 </div>
476 <div class="section" id="color">
477 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">color</tt></a></h2>
478 <p>Configure the Mercurial color mode. For details about how to define your custom
479 effect and style see <a class="reference external" href="topic-color.html"><tt class="docutils literal">hg help color</tt></a>.</p>
480 <dl class="docutils">
481 <dt><tt class="docutils literal">mode</tt></dt>
482 <dd>String: control the method used to output color. One of <tt class="docutils literal">auto</tt>, <tt class="docutils literal">ansi</tt>,
483 <tt class="docutils literal">win32</tt>, <tt class="docutils literal">terminfo</tt> or <tt class="docutils literal">debug</tt>. In auto mode, Mercurial will
484 use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a
485 terminal. Any invalid value will disable color.</dd>
486 <dt><tt class="docutils literal">pagermode</tt></dt>
487 <dd><p class="first">String: optional override of <tt class="docutils literal">color.mode</tt> used with pager.</p>
488 <p>On some systems, terminfo mode may cause problems when using
489 color with <tt class="docutils literal">less <span class="pre">-R</span></tt> as a pager program. less with the -R option
490 will only display ECMA-48 color codes, and terminfo mode may sometimes
491 emit codes that less doesn't understand. You can work around this by
492 either using ansi mode (or auto mode), or by using less -r (which will
493 pass through all terminal control codes, not just color control
494 codes).</p>
495 <p class="last">On some systems (such as MSYS in Windows), the terminal may support
496 a different color mode than the pager program.</p>
497 </dd>
498 </dl>
499 </div>
500 <div class="section" id="commands">
501 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">commands</tt></a></h2>
502 <dl class="docutils">
503 <dt><tt class="docutils literal"><span class="pre">commit.post-status</span></tt></dt>
504 <dd>Show status of files in the working directory after successful commit.
505 (default: False)</dd>
506 <dt><tt class="docutils literal"><span class="pre">merge.require-rev</span></tt></dt>
507 <dd>Require that the revision to merge the current commit with be specified on
508 the command line. If this is enabled and a revision is not specified, the
509 command aborts.
510 (default: False)</dd>
511 <dt><tt class="docutils literal"><span class="pre">push.require-revs</span></tt></dt>
512 <dd>Require revisions to push be specified using one or more mechanisms such as
513 specifying them positionally on the command line, using <tt class="docutils literal"><span class="pre">-r</span></tt>, <tt class="docutils literal"><span class="pre">-b</span></tt>,
514 and/or <tt class="docutils literal"><span class="pre">-B</span></tt> on the command line, or using <tt class="docutils literal"><span class="pre">paths.&lt;path&gt;:pushrev</span></tt> in the
515 configuration. If this is enabled and revisions are not specified, the
516 command aborts.
517 (default: False)</dd>
518 <dt><tt class="docutils literal">resolve.confirm</tt></dt>
519 <dd>Confirm before performing action if no filename is passed.
520 (default: False)</dd>
521 <dt><tt class="docutils literal"><span class="pre">resolve.explicit-re-merge</span></tt></dt>
522 <dd>Require uses of <tt class="docutils literal">hg resolve</tt> to specify which action it should perform,
523 instead of re-merging files by default.
524 (default: False)</dd>
525 <dt><tt class="docutils literal"><span class="pre">resolve.mark-check</span></tt></dt>
526 <dd>Determines what level of checking <a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">--mark</span></tt></a> will perform before
527 marking files as resolved. Valid values are <tt class="docutils literal">none`, ``warn</tt>, and
528 <tt class="docutils literal">abort</tt>. <tt class="docutils literal">warn</tt> will output a warning listing the file(s) that still
529 have conflict markers in them, but will still mark everything resolved.
530 <tt class="docutils literal">abort</tt> will output the same warning but will not mark things as resolved.
531 If --all is passed and this is set to <tt class="docutils literal">abort</tt>, only a warning will be
532 shown (an error will not be raised).
533 (default: <tt class="docutils literal">none</tt>)</dd>
534 <dt><tt class="docutils literal">status.relative</tt></dt>
535 <dd>Make paths in <a class="reference external" href="hg-status.html"><tt class="docutils literal">hg status</tt></a> output relative to the current directory.
536 (default: False)</dd>
537 <dt><tt class="docutils literal">status.terse</tt></dt>
538 <dd>Default value for the --terse flag, which condenses status output.
539 (default: empty)</dd>
540 <dt><tt class="docutils literal">update.check</tt></dt>
541 <dd><p class="first">Determines what level of checking <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update</tt></a> will perform before moving
542 to a destination revision. Valid values are <tt class="docutils literal">abort</tt>, <tt class="docutils literal">none</tt>,
543 <tt class="docutils literal">linear</tt>, and <tt class="docutils literal">noconflict</tt>.</p>
544 <ul class="simple">
545 <li><tt class="docutils literal">abort</tt> always fails if the working directory has uncommitted changes.</li>
546 <li><tt class="docutils literal">none</tt> performs no checking, and may result in a merge with uncommitted changes.</li>
547 <li><tt class="docutils literal">linear</tt> allows any update as long as it follows a straight line in the
548 revision history, and may trigger a merge with uncommitted changes.</li>
549 <li><tt class="docutils literal">noconflict</tt> will allow any update which would not trigger a merge with
550 uncommitted changes, if any are present.</li>
551 </ul>
552 <p class="last">(default: <tt class="docutils literal">linear</tt>)</p>
553 </dd>
554 <dt><tt class="docutils literal">update.requiredest</tt></dt>
555 <dd>Require that the user pass a destination when running <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update</tt></a>.
556 For example, <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update .::</tt></a> will be allowed, but a plain <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update</tt></a>
557 will be disallowed.
558 (default: False)</dd>
559 </dl>
560 </div>
561 <div class="section" id="committemplate">
562 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">committemplate</tt></a></h2>
563 <dl class="docutils">
564 <dt><tt class="docutils literal">changeset</tt></dt>
565 <dd>String: configuration in this section is used as the template to
566 customize the text shown in the editor when committing.</dd>
567 </dl>
568 <p>In addition to pre-defined template keywords, commit log specific one
569 below can be used for customization:</p>
570 <dl class="docutils">
571 <dt><tt class="docutils literal">extramsg</tt></dt>
572 <dd>String: Extra message (typically 'Leave message empty to abort
573 commit.'). This may be changed by some commands or extensions.</dd>
574 </dl>
575 <p>For example, the template configuration below shows as same text as
576 one shown by default:</p>
577 <pre class="literal-block">
578 [committemplate]
579 changeset = {desc}\n\n
580 HG: Enter commit message. Lines beginning with 'HG:' are removed.
581 HG: {extramsg}
582 HG: --
583 HG: user: {author}\n{ifeq(p2rev, &quot;-1&quot;, &quot;&quot;,
584 &quot;HG: branch merge\n&quot;)
585 }HG: branch '{branch}'\n{if(activebookmark,
586 &quot;HG: bookmark '{activebookmark}'\n&quot;) }{subrepos %
587 &quot;HG: subrepo {subrepo}\n&quot; }{file_adds %
588 &quot;HG: added {file}\n&quot; }{file_mods %
589 &quot;HG: changed {file}\n&quot; }{file_dels %
590 &quot;HG: removed {file}\n&quot; }{if(files, &quot;&quot;,
591 &quot;HG: no files changed\n&quot;)}
592 </pre>
593 <dl class="docutils">
594 <dt><tt class="docutils literal">diff()</tt></dt>
595 <dd>String: show the diff (see <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for detail)</dd>
596 </dl>
597 <p>Sometimes it is helpful to show the diff of the changeset in the editor without
598 having to prefix 'HG: ' to each line so that highlighting works correctly. For
599 this, Mercurial provides a special string which will ignore everything below
600 it:</p>
601 <pre class="literal-block">
602 HG: ------------------------ &gt;8 ------------------------
603 </pre>
604 <p>For example, the template configuration below will show the diff below the
605 extra message:</p>
606 <pre class="literal-block">
607 [committemplate]
608 changeset = {desc}\n\n
609 HG: Enter commit message. Lines beginning with 'HG:' are removed.
610 HG: {extramsg}
611 HG: ------------------------ &gt;8 ------------------------
612 HG: Do not touch the line above.
613 HG: Everything below will be removed.
614 {diff()}
615 </pre>
616 <div class="admonition note">
617 <p class="first admonition-title">Note</p>
618 <p>For some problematic encodings (see <a class="reference external" href="ext-win32mbcs.html"><tt class="docutils literal">hg help win32mbcs</tt></a> for
619 detail), this customization should be configured carefully, to
620 avoid showing broken characters.</p>
621 <p class="last">For example, if a multibyte character ending with backslash (0x5c) is
622 followed by the ASCII character 'n' in the customized template,
623 the sequence of backslash and 'n' is treated as line-feed unexpectedly
624 (and the multibyte character is broken, too).</p>
625 </div>
626 <p>Customized template is used for commands below (<tt class="docutils literal"><span class="pre">--edit</span></tt> may be
627 required):</p>
628 <ul class="simple">
629 <li><a class="reference external" href="hg-backout.html"><tt class="docutils literal">hg backout</tt></a></li>
630 <li><a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit</tt></a></li>
631 <li><a class="reference external" href="hg-fetch.html"><tt class="docutils literal">hg fetch</tt></a> (for merge commit only)</li>
632 <li><a class="reference external" href="hg-graft.html"><tt class="docutils literal">hg graft</tt></a></li>
633 <li><a class="reference external" href="hg-histedit.html"><tt class="docutils literal">hg histedit</tt></a></li>
634 <li><a class="reference external" href="hg-import.html"><tt class="docutils literal">hg import</tt></a></li>
635 <li><a class="reference external" href="hg-qfold.html"><tt class="docutils literal">hg qfold</tt></a>, <a class="reference external" href="hg-qnew.html"><tt class="docutils literal">hg qnew</tt></a> and <a class="reference external" href="hg-qrefresh.html"><tt class="docutils literal">hg qrefresh</tt></a></li>
636 <li><a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase</tt></a></li>
637 <li><a class="reference external" href="hg-shelve.html"><tt class="docutils literal">hg shelve</tt></a></li>
638 <li><a class="reference external" href="hg-sign.html"><tt class="docutils literal">hg sign</tt></a></li>
639 <li><a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag</tt></a></li>
640 <li><a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant</tt></a></li>
641 </ul>
642 <p>Configuring items below instead of <tt class="docutils literal">changeset</tt> allows showing
643 customized message only for specific actions, or showing different
644 messages for each action.</p>
645 <ul class="simple">
646 <li><tt class="docutils literal">changeset.backout</tt> for <a class="reference external" href="hg-backout.html"><tt class="docutils literal">hg backout</tt></a></li>
647 <li><tt class="docutils literal">changeset.commit.amend.merge</tt> for <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit <span class="pre">--amend</span></tt></a> on merges</li>
648 <li><tt class="docutils literal">changeset.commit.amend.normal</tt> for <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit <span class="pre">--amend</span></tt></a> on other</li>
649 <li><tt class="docutils literal">changeset.commit.normal.merge</tt> for <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit</tt></a> on merges</li>
650 <li><tt class="docutils literal">changeset.commit.normal.normal</tt> for <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit</tt></a> on other</li>
651 <li><tt class="docutils literal">changeset.fetch</tt> for <a class="reference external" href="hg-fetch.html"><tt class="docutils literal">hg fetch</tt></a> (impling merge commit)</li>
652 <li><tt class="docutils literal">changeset.gpg.sign</tt> for <a class="reference external" href="hg-sign.html"><tt class="docutils literal">hg sign</tt></a></li>
653 <li><tt class="docutils literal">changeset.graft</tt> for <a class="reference external" href="hg-graft.html"><tt class="docutils literal">hg graft</tt></a></li>
654 <li><tt class="docutils literal">changeset.histedit.edit</tt> for <tt class="docutils literal">edit</tt> of <a class="reference external" href="hg-histedit.html"><tt class="docutils literal">hg histedit</tt></a></li>
655 <li><tt class="docutils literal">changeset.histedit.fold</tt> for <tt class="docutils literal">fold</tt> of <a class="reference external" href="hg-histedit.html"><tt class="docutils literal">hg histedit</tt></a></li>
656 <li><tt class="docutils literal">changeset.histedit.mess</tt> for <tt class="docutils literal">mess</tt> of <a class="reference external" href="hg-histedit.html"><tt class="docutils literal">hg histedit</tt></a></li>
657 <li><tt class="docutils literal">changeset.histedit.pick</tt> for <tt class="docutils literal">pick</tt> of <a class="reference external" href="hg-histedit.html"><tt class="docutils literal">hg histedit</tt></a></li>
658 <li><tt class="docutils literal">changeset.import.bypass</tt> for <a class="reference external" href="hg-import.html"><tt class="docutils literal">hg import <span class="pre">--bypass</span></tt></a></li>
659 <li><tt class="docutils literal">changeset.import.normal.merge</tt> for <a class="reference external" href="hg-import.html"><tt class="docutils literal">hg import</tt></a> on merges</li>
660 <li><tt class="docutils literal">changeset.import.normal.normal</tt> for <a class="reference external" href="hg-import.html"><tt class="docutils literal">hg import</tt></a> on other</li>
661 <li><tt class="docutils literal">changeset.mq.qnew</tt> for <a class="reference external" href="hg-qnew.html"><tt class="docutils literal">hg qnew</tt></a></li>
662 <li><tt class="docutils literal">changeset.mq.qfold</tt> for <a class="reference external" href="hg-qfold.html"><tt class="docutils literal">hg qfold</tt></a></li>
663 <li><tt class="docutils literal">changeset.mq.qrefresh</tt> for <a class="reference external" href="hg-qrefresh.html"><tt class="docutils literal">hg qrefresh</tt></a></li>
664 <li><tt class="docutils literal">changeset.rebase.collapse</tt> for <a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase <span class="pre">--collapse</span></tt></a></li>
665 <li><tt class="docutils literal">changeset.rebase.merge</tt> for <a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase</tt></a> on merges</li>
666 <li><tt class="docutils literal">changeset.rebase.normal</tt> for <a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase</tt></a> on other</li>
667 <li><tt class="docutils literal">changeset.shelve.shelve</tt> for <a class="reference external" href="hg-shelve.html"><tt class="docutils literal">hg shelve</tt></a></li>
668 <li><tt class="docutils literal">changeset.tag.add</tt> for <a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag</tt></a> without <tt class="docutils literal"><span class="pre">--remove</span></tt></li>
669 <li><tt class="docutils literal">changeset.tag.remove</tt> for <a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag <span class="pre">--remove</span></tt></a></li>
670 <li><tt class="docutils literal">changeset.transplant.merge</tt> for <a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant</tt></a> on merges</li>
671 <li><tt class="docutils literal">changeset.transplant.normal</tt> for <a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant</tt></a> on other</li>
672 </ul>
673 <p>These dot-separated lists of names are treated as hierarchical ones.
674 For example, <tt class="docutils literal">changeset.tag.remove</tt> customizes the commit message
675 only for <a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag <span class="pre">--remove</span></tt></a>, but <tt class="docutils literal">changeset.tag</tt> customizes the
676 commit message for <a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag</tt></a> regardless of <tt class="docutils literal"><span class="pre">--remove</span></tt> option.</p>
677 <p>When the external editor is invoked for a commit, the corresponding
678 dot-separated list of names without the <tt class="docutils literal">changeset.</tt> prefix
679 (e.g. <tt class="docutils literal">commit.normal.normal</tt>) is in the <tt class="docutils literal">HGEDITFORM</tt> environment
680 variable.</p>
681 <p>In this section, items other than <tt class="docutils literal">changeset</tt> can be referred from
682 others. For example, the configuration to list committed files up
683 below can be referred as <tt class="docutils literal">{listupfiles}</tt>:</p>
684 <pre class="literal-block">
685 [committemplate]
686 listupfiles = {file_adds %
687 &quot;HG: added {file}\n&quot; }{file_mods %
688 &quot;HG: changed {file}\n&quot; }{file_dels %
689 &quot;HG: removed {file}\n&quot; }{if(files, &quot;&quot;,
690 &quot;HG: no files changed\n&quot;)}
691 </pre>
692 </div>
693 <div class="section" id="decode-encode">
694 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">decode/encode</tt></a></h2>
695 <p>Filters for transforming files on checkout/checkin. This would
696 typically be used for newline processing or other
697 localization/canonicalization of files.</p>
698 <p>Filters consist of a filter pattern followed by a filter command.
699 Filter patterns are globs by default, rooted at the repository root.
700 For example, to match any file ending in <tt class="docutils literal">.txt</tt> in the root
701 directory only, use the pattern <tt class="docutils literal">*.txt</tt>. To match any file ending
702 in <tt class="docutils literal">.c</tt> anywhere in the repository, use the pattern <tt class="docutils literal"><span class="pre">**.c</span></tt>.
703 For each file only the first matching filter applies.</p>
704 <p>The filter command can start with a specifier, either <tt class="docutils literal">pipe:</tt> or
705 <tt class="docutils literal">tempfile:</tt>. If no specifier is given, <tt class="docutils literal">pipe:</tt> is used by default.</p>
706 <p>A <tt class="docutils literal">pipe:</tt> command must accept data on stdin and return the transformed
707 data on stdout.</p>
708 <p>Pipe example:</p>
709 <pre class="literal-block">
710 [encode]
711 # uncompress gzip files on checkin to improve delta compression
712 # note: not necessarily a good idea, just an example
713 *.gz = pipe: gunzip
714
715 [decode]
716 # recompress gzip files when writing them to the working dir (we
717 # can safely omit &quot;pipe:&quot;, because it's the default)
718 *.gz = gzip
719 </pre>
720 <p>A <tt class="docutils literal">tempfile:</tt> command is a template. The string <tt class="docutils literal">INFILE</tt> is replaced
721 with the name of a temporary file that contains the data to be
722 filtered by the command. The string <tt class="docutils literal">OUTFILE</tt> is replaced with the name
723 of an empty temporary file, where the filtered data must be written by
724 the command.</p>
725 <div class="windows docutils container">
726 <div class="admonition note">
727 <p class="first admonition-title">Note</p>
728 <p class="last">The tempfile mechanism is recommended for Windows systems,
729 where the standard shell I/O redirection operators often have
730 strange effects and may corrupt the contents of your files.</p>
731 </div>
732 </div>
733 <p>This filter mechanism is used internally by the <tt class="docutils literal">eol</tt> extension to
734 translate line ending characters between Windows (CRLF) and Unix (LF)
735 format. We suggest you use the <tt class="docutils literal">eol</tt> extension for convenience.</p>
736 </div>
737 <div class="section" id="defaults">
738 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">defaults</tt></a></h2>
739 <p>(defaults are deprecated. Don't use them. Use aliases instead.)</p>
740 <p>Use the <tt class="docutils literal">[defaults]</tt> section to define command defaults, i.e. the
741 default options/arguments to pass to the specified commands.</p>
742 <p>The following example makes <a class="reference external" href="hg-log.html"><tt class="docutils literal">hg log</tt></a> run in verbose mode, and
743 <a class="reference external" href="hg-status.html"><tt class="docutils literal">hg status</tt></a> show only the modified files, by default:</p>
744 <pre class="literal-block">
745 [defaults]
746 log = -v
747 status = -m
748 </pre>
749 <p>The actual commands, instead of their aliases, must be used when
750 defining command defaults. The command defaults will also be applied
751 to the aliases of the commands defined.</p>
752 </div>
753 <div class="section" id="diff">
754 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">diff</tt></a></h2>
755 <p>Settings used when displaying diffs. Everything except for <tt class="docutils literal">unified</tt>
756 is a Boolean and defaults to False. See <a class="reference external" href="hgrc.5.html#annotate"><tt class="docutils literal">hg help config.annotate</tt></a>
757 for related options for the annotate command.</p>
758 <dl class="docutils">
759 <dt><tt class="docutils literal">git</tt></dt>
760 <dd>Use git extended diff format.</dd>
761 <dt><tt class="docutils literal">merge</tt></dt>
762 <dd>Show a &quot;merge diff&quot; instead of defaulting to a diff against
763 the working directory's first parent. A &quot;merge diff&quot; will diff against the
764 conflict regions in the merge, which is very useful to make sense of what
765 the merge commit itself has done.</dd>
766 <dt><tt class="docutils literal">nobinary</tt></dt>
767 <dd>Omit git binary patches.</dd>
768 <dt><tt class="docutils literal">nodates</tt></dt>
769 <dd>Don't include dates in diff headers.</dd>
770 <dt><tt class="docutils literal">noprefix</tt></dt>
771 <dd>Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode.</dd>
772 <dt><tt class="docutils literal">showfunc</tt></dt>
773 <dd>Show which function each change is in.</dd>
774 <dt><tt class="docutils literal">ignorews</tt></dt>
775 <dd>Ignore white space when comparing lines.</dd>
776 <dt><tt class="docutils literal">ignorewsamount</tt></dt>
777 <dd>Ignore changes in the amount of white space.</dd>
778 <dt><tt class="docutils literal">ignoreblanklines</tt></dt>
779 <dd>Ignore changes whose lines are all blank.</dd>
780 <dt><tt class="docutils literal">unified</tt></dt>
781 <dd>Number of lines of context to show.</dd>
782 <dt><tt class="docutils literal"><span class="pre">word-diff</span></tt></dt>
783 <dd>Highlight changed words.</dd>
784 </dl>
785 </div>
786 <div class="section" id="email">
787 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">email</tt></a></h2>
788 <p>Settings for extensions that send email messages.</p>
789 <dl class="docutils">
790 <dt><tt class="docutils literal">from</tt></dt>
791 <dd>Optional. Email address to use in &quot;From&quot; header and SMTP envelope
792 of outgoing messages.</dd>
793 <dt><tt class="docutils literal">to</tt></dt>
794 <dd>Optional. Comma-separated list of recipients' email addresses.</dd>
795 <dt><tt class="docutils literal">cc</tt></dt>
796 <dd>Optional. Comma-separated list of carbon copy recipients'
797 email addresses.</dd>
798 <dt><tt class="docutils literal">bcc</tt></dt>
799 <dd>Optional. Comma-separated list of blind carbon copy recipients'
800 email addresses.</dd>
801 <dt><tt class="docutils literal">method</tt></dt>
802 <dd>Optional. Method to use to send email messages. If value is <tt class="docutils literal">smtp</tt>
803 (default), use SMTP (see the <tt class="docutils literal">[smtp]</tt> section for configuration).
804 Otherwise, use as name of program to run that acts like sendmail
805 (takes <tt class="docutils literal"><span class="pre">-f</span></tt> option for sender, list of recipients on command line,
806 message on stdin). Normally, setting this to <tt class="docutils literal">sendmail</tt> or
807 <tt class="docutils literal">/usr/sbin/sendmail</tt> is enough to use sendmail to send messages.</dd>
808 <dt><tt class="docutils literal">charsets</tt></dt>
809 <dd><p class="first">Optional. Comma-separated list of character sets considered
810 convenient for recipients. Addresses, headers, and parts not
811 containing patches of outgoing messages will be encoded in the
812 first character set to which conversion from local encoding
813 (<tt class="docutils literal">$HGENCODING</tt>, <tt class="docutils literal">ui.fallbackencoding</tt>) succeeds. If correct
814 conversion fails, the text in question is sent as is.
815 (default: '')</p>
816 <p>Order of outgoing email character sets:</p>
817 <ol class="last arabic simple">
818 <li><tt class="docutils literal"><span class="pre">us-ascii</span></tt>: always first, regardless of settings</li>
819 <li><tt class="docutils literal">email.charsets</tt>: in order given by user</li>
820 <li><tt class="docutils literal">ui.fallbackencoding</tt>: if not in email.charsets</li>
821 <li><tt class="docutils literal">$HGENCODING</tt>: if not in email.charsets</li>
822 <li><tt class="docutils literal"><span class="pre">utf-8</span></tt>: always last, regardless of settings</li>
823 </ol>
824 </dd>
825 </dl>
826 <p>Email example:</p>
827 <pre class="literal-block">
828 [email]
829 from = Joseph User &lt;joe.user&#64;example.com&gt;
830 method = /usr/sbin/sendmail
831 # charsets for western Europeans
832 # us-ascii, utf-8 omitted, as they are tried first and last
833 charsets = iso-8859-1, iso-8859-15, windows-1252
834 </pre>
835 </div>
836 <div class="section" id="extensions">
837 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">extensions</tt></a></h2>
838 <p>Mercurial has an extension mechanism for adding new features. To
839 enable an extension, create an entry for it in this section.</p>
840 <p>If you know that the extension is already in Python's search path,
841 you can give the name of the module, followed by <tt class="docutils literal">=</tt>, with nothing
842 after the <tt class="docutils literal">=</tt>.</p>
843 <p>Otherwise, give a name that you choose, followed by <tt class="docutils literal">=</tt>, followed by
844 the path to the <tt class="docutils literal">.py</tt> file (including the file name extension) that
845 defines the extension.</p>
846 <p>To explicitly disable an extension that is enabled in an hgrc of
847 broader scope, prepend its path with <tt class="docutils literal">!</tt>, as in <tt class="docutils literal">foo = !/ext/path</tt>
848 or <tt class="docutils literal">foo = !</tt> when path is not supplied.</p>
849 <p>Example for <tt class="docutils literal"><span class="pre">~/.hgrc</span></tt>:</p>
850 <pre class="literal-block">
851 [extensions]
852 # (the churn extension will get loaded from Mercurial's path)
853 churn =
854 # (this extension will get loaded from the file specified)
855 myfeature = ~/.hgext/myfeature.py
856 </pre>
857 <p>If an extension fails to load, a warning will be issued, and Mercurial will
858 proceed. To enforce that an extension must be loaded, one can set the <cite>required</cite>
859 suboption in the config:</p>
860 <pre class="literal-block">
861 [extensions]
862 myfeature = ~/.hgext/myfeature.py
863 myfeature:required = yes
864 </pre>
865 <p>To debug extension loading issue, one can add <cite>--traceback</cite> to their mercurial
866 invocation.</p>
867 <p>A default setting can we set using the special <cite>*</cite> extension key:</p>
868 <pre class="literal-block">
869 [extensions]
870 *:required = yes
871 myfeature = ~/.hgext/myfeature.py
872 rebase=
873 </pre>
874 </div>
875 <div class="section" id="format">
876 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">format</tt></a></h2>
877 <p>Configuration that controls the repository format. Newer format options are more
878 powerful, but incompatible with some older versions of Mercurial.</p>
879 <p>Format options are considered at repository initialization only. You need to
880 make a new clone for config changes to be taken into account.</p>
881 <p>For more details about repository format and version compatibility, see
882 <a class="reference external" href="https://www.mercurial-scm.org/wiki/MissingRequirement">https://www.mercurial-scm.org/wiki/MissingRequirement</a></p>
883 <dl class="docutils">
884 <dt><tt class="docutils literal">usegeneraldelta</tt></dt>
885 <dd><p class="first">Enable or disable the &quot;generaldelta&quot; repository format which improves
886 repository compression by allowing &quot;revlog&quot; to store deltas against
887 arbitrary revisions instead of the previously stored one. This provides
888 significant improvement for repositories with branches.</p>
889 <p>Repositories with this on-disk format require Mercurial version 1.9.</p>
890 <p class="last">Enabled by default. Implied by <cite>sparse-revlog</cite></p>
891 </dd>
892 <dt><tt class="docutils literal">dotencode</tt></dt>
893 <dd><p class="first">Enable or disable the &quot;dotencode&quot; repository format which enhances
894 the &quot;fncache&quot; repository format (which has to be enabled to use
895 dotencode) to avoid issues with filenames starting with &quot;._&quot; on
896 Mac OS X and spaces on Windows.</p>
897 <p>Repositories with this on-disk format require Mercurial version 1.7.</p>
898 <p class="last">Enabled by default.</p>
899 </dd>
900 <dt><tt class="docutils literal">usefncache</tt></dt>
901 <dd><p class="first">Enable or disable the &quot;fncache&quot; repository format which enhances
902 the &quot;store&quot; repository format (which has to be enabled to use
903 fncache) to allow longer filenames and avoids using Windows
904 reserved names, e.g. &quot;nul&quot;.</p>
905 <p>Repositories with this on-disk format require Mercurial version 1.1.</p>
906 <p class="last">Enabled by default.</p>
907 </dd>
908 <dt><tt class="docutils literal"><span class="pre">use-delta-info-flags</span></tt></dt>
909 <dd><p class="first">Store more information through flags in the revlog's index.</p>
910 <p>These flags allow for more efficient data access, data exchange and
911 data storage in general.</p>
912 <p>In particular, one can expect better performance for the following categories of
913 commands for repositories using this format can expect better performance than
914 ones using older formats:</p>
915 <ul class="last simple">
916 <li><cite>hg status --copies --rev X</cite></li>
917 <li><cite>hg diff</cite></li>
918 <li><cite>hg merge</cite></li>
919 <li><cite>hg clone</cite></li>
920 <li><cite>hg pull</cite></li>
921 <li><cite>hg push</cite></li>
922 <li><cite>hg unbundle</cite></li>
923 </ul>
924 </dd>
925 <dt><tt class="docutils literal"><span class="pre">use-dirstate-v2</span></tt></dt>
926 <dd><p class="first">Enable or disable the experimental &quot;dirstate-v2&quot; feature. The dirstate
927 functionality is shared by all commands interacting with the working copy.
928 The new version is more robust, faster and stores more information.</p>
929 <p>The performance-improving version of this feature is currently only
930 implemented in Rust (see <a class="reference external" href="topic-rust.html"><tt class="docutils literal">hg help rust</tt></a>), so people not using a version of
931 Mercurial compiled with the Rust parts might actually suffer some slowdown.
932 For this reason, such versions will by default refuse to access repositories
933 with &quot;dirstate-v2&quot; enabled.</p>
934 <p>This behavior can be adjusted via configuration: check
935 <a class="reference external" href="hgrc.5.html#storage"><tt class="docutils literal">hg help <span class="pre">config.storage.dirstate-v2.slow-path</span></tt></a> for details.</p>
936 <p>Repositories with this on-disk format require Mercurial 6.0 or above.</p>
937 <p>By default this format variant is disabled if the fast implementation is not
938 available, and enabled by default if the fast implementation is available.</p>
939 <p>To accomodate installations of Mercurial without the fast implementation,
940 you can downgrade your repository. To do so run the following command:</p>
941 <pre class="literal-block">
942 $ hg debugupgraderepo \
943 --run \
944 --config format.use-dirstate-v2=False \
945 --config storage.dirstate-v2.slow-path=allow
946 </pre>
947 <p class="last">For a more comprehensive guide, see <a class="reference external" href="hg.1.html#internals.dirstate-v2"><tt class="docutils literal">hg help <span class="pre">internals.dirstate-v2</span></tt></a>.</p>
948 </dd>
949 <dt><tt class="docutils literal"><span class="pre">use-dirstate-v2.automatic-upgrade-of-mismatching-repositories</span></tt></dt>
950 <dd><p class="first">When enabled, an automatic upgrade will be triggered when a repository format
951 does not match its <cite>use-dirstate-v2</cite> config.</p>
952 <p>This is an advanced behavior that most users will not need. We recommend you
953 don't use this unless you are a seasoned administrator of a Mercurial install
954 base.</p>
955 <p>Automatic upgrade means that any process accessing the repository will
956 upgrade the repository format to use <cite>dirstate-v2</cite>. This only triggers if a
957 change is needed. This also applies to operations that would have been
958 read-only (like hg status).</p>
959 <p>If the repository cannot be locked, the automatic-upgrade operation will be
960 skipped. The next operation will attempt it again.</p>
961 <p class="last">This configuration will apply for moves in any direction, either adding the
962 <cite>dirstate-v2</cite> format if <cite>format.use-dirstate-v2=yes</cite> or removing the
963 <cite>dirstate-v2</cite> requirement if <cite>format.use-dirstate-v2=no</cite>. So we recommend
964 setting both this value and <cite>format.use-dirstate-v2</cite> at the same time.</p>
965 </dd>
966 <dt><tt class="docutils literal"><span class="pre">use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet</span></tt></dt>
967 <dd>Hide message when performing such automatic upgrade.</dd>
968 <dt><tt class="docutils literal"><span class="pre">use-dirstate-tracked-hint</span></tt></dt>
969 <dd><p class="first">Enable or disable the writing of &quot;tracked key&quot; file alongside
970 the dirstate. (default to disabled)</p>
971 <p>That &quot;tracked-hint&quot; can help external automations to detect changes to
972 the set of tracked files. (i.e the result of 'hg files' or 'hg status
973 -macd')</p>
974 <p>The tracked-hint is written in a new '.hg/dirstate-tracked-hint'. That
975 file contains two lines: - the first line is the file version
976 (currently: 1), - the second line contains the &quot;tracked-hint&quot;. That
977 file is written right after the dirstate is written.</p>
978 <p>The tracked-hint changes whenever the set of file tracked in the
979 dirstate changes. The general idea is: - if the hint is identical, the
980 set of tracked file SHOULD be identical, - if the hint is different,
981 the set of tracked file MIGHT be different.</p>
982 <p>The &quot;hint is identical&quot; case uses 'SHOULD' as the dirstate and the
983 hint file are two distinct files and therefore that cannot be read or
984 written to in an atomic way. If the key is identical, nothing
985 garantees that the dirstate is not updated right after the hint file.
986 This is considered a negligible limitation for the intended usecase.
987 It is actually possible to prevent this race by taking the repository
988 lock during read operations.</p>
989 <p>They are two &quot;ways&quot; to use this feature:</p>
990 <p>1) monitoring changes to the '.hg/dirstate-tracked-hint', if the file
991 changes, the tracked set might have changed.</p>
992 <ol class="last arabic simple" start="2">
993 <li>storing the value and comparing it to a later value.</li>
994 </ol>
995 </dd>
996 <dt><tt class="docutils literal"><span class="pre">use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories</span></tt></dt>
997 <dd><p class="first">When enabled, an automatic upgrade will be triggered when a repository format
998 does not match its <cite>use-dirstate-tracked-hint</cite> config.</p>
999 <p>This is an advanced behavior that most users will not need. We recommend you
1000 don't use this unless you are a seasoned administrator of a Mercurial install
1001 base.</p>
1002 <p>Automatic upgrade means that any process accessing the repository will
1003 upgrade the repository format to use <cite>dirstate-tracked-hint</cite>. This only
1004 triggers if a change is needed. This also applies to operations that would
1005 have been read-only (like hg status).</p>
1006 <p>If the repository cannot be locked, the automatic-upgrade operation will be
1007 skipped. The next operation will attempt it again.</p>
1008 <p class="last">This configuration will apply for moves in any direction, either adding the
1009 <cite>dirstate-tracked-hint</cite> format if <cite>format.use-dirstate-tracked-hint=yes</cite> or
1010 removing the <cite>dirstate-tracked-hint</cite> requirement if
1011 <cite>format.use-dirstate-tracked-hint=no</cite>. So we recommend setting both this
1012 value and <cite>format.use-dirstate-tracked-hint</cite> at the same time.</p>
1013 </dd>
1014 <dt><tt class="docutils literal"><span class="pre">use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet</span></tt></dt>
1015 <dd>Hide message when performing such automatic upgrade.</dd>
1016 <dt><tt class="docutils literal"><span class="pre">use-persistent-nodemap</span></tt></dt>
1017 <dd><p class="first">Enable or disable the &quot;persistent-nodemap&quot; feature which improves
1018 performance if the Rust extensions are available.</p>
1019 <p>The &quot;persistent-nodemap&quot; persist the &quot;node -&gt; rev&quot; on disk removing the
1020 need to dynamically build that mapping for each Mercurial invocation. This
1021 significantly reduces the startup cost of various local and server-side
1022 operation for larger repositories.</p>
1023 <p>The performance-improving version of this feature is currently only
1024 implemented in Rust (see <a class="reference external" href="topic-rust.html"><tt class="docutils literal">hg help rust</tt></a>), so people not using a version of
1025 Mercurial compiled with the Rust parts might actually suffer some slowdown.
1026 For this reason, such versions will by default refuse to access repositories
1027 with &quot;persistent-nodemap&quot;.</p>
1028 <p>This behavior can be adjusted via configuration: check
1029 <a class="reference external" href="hgrc.5.html#storage"><tt class="docutils literal">hg help <span class="pre">config.storage.revlog.persistent-nodemap.slow-path</span></tt></a> for details.</p>
1030 <p>Repositories with this on-disk format require Mercurial 5.4 or above.</p>
1031 <p>By default this format variant is disabled if the fast implementation is not
1032 available, and enabled by default if the fast implementation is available.</p>
1033 <p>To accomodate installations of Mercurial without the fast implementation,
1034 you can downgrade your repository. To do so run the following command:</p>
1035 <pre class="last literal-block">
1036 $ hg debugupgraderepo \
1037 --run \
1038 --config format.use-persistent-nodemap=False \
1039 --config storage.revlog.persistent-nodemap.slow-path=allow
1040 </pre>
1041 </dd>
1042 <dt><tt class="docutils literal"><span class="pre">use-share-safe</span></tt></dt>
1043 <dd><p class="first">Enforce &quot;safe&quot; behaviors for all &quot;shares&quot; that access this repository.</p>
1044 <p>With this feature, &quot;shares&quot; using this repository as a source will:</p>
1045 <ul class="simple">
1046 <li>read the source repository's configuration (<cite>&lt;source&gt;/.hg/hgrc</cite>).</li>
1047 <li>read and use the source repository's &quot;requirements&quot;
1048 (except the working copy specific one).</li>
1049 </ul>
1050 <p>Without this feature, &quot;shares&quot; using this repository as a source will:</p>
1051 <ul class="simple">
1052 <li>keep tracking the repository &quot;requirements&quot; in the share only, ignoring
1053 the source &quot;requirements&quot;, possibly diverging from them.</li>
1054 <li>ignore source repository config. This can create problems, like silently
1055 ignoring important hooks.</li>
1056 </ul>
1057 <p>Beware that existing shares will not be upgraded/downgraded, and by
1058 default, Mercurial will refuse to interact with them until the mismatch
1059 is resolved. See <a class="reference external" href="hgrc.5.html#share"><tt class="docutils literal">hg help <span class="pre">config.share.safe-mismatch.source-safe</span></tt></a> and
1060 <a class="reference external" href="hgrc.5.html#share"><tt class="docutils literal">hg help <span class="pre">config.share.safe-mismatch.source-not-safe</span></tt></a> for details.</p>
1061 <p>Introduced in Mercurial 5.7.</p>
1062 <p class="last">Enabled by default in Mercurial 6.1.</p>
1063 </dd>
1064 <dt><tt class="docutils literal"><span class="pre">use-share-safe.automatic-upgrade-of-mismatching-repositories</span></tt></dt>
1065 <dd><p class="first">When enabled, an automatic upgrade will be triggered when a repository format
1066 does not match its <cite>use-share-safe</cite> config.</p>
1067 <p>This is an advanced behavior that most users will not need. We recommend you
1068 don't use this unless you are a seasoned administrator of a Mercurial install
1069 base.</p>
1070 <p>Automatic upgrade means that any process accessing the repository will
1071 upgrade the repository format to use <cite>share-safe</cite>. This only triggers if a
1072 change is needed. This also applies to operation that would have been
1073 read-only (like hg status).</p>
1074 <p>If the repository cannot be locked, the automatic-upgrade operation will be
1075 skipped. The next operation will attempt it again.</p>
1076 <p class="last">This configuration will apply for moves in any direction, either adding the
1077 <cite>share-safe</cite> format if <cite>format.use-share-safe=yes</cite> or removing the
1078 <cite>share-safe</cite> requirement if <cite>format.use-share-safe=no</cite>. So we recommend
1079 setting both this value and <cite>format.use-share-safe</cite> at the same time.</p>
1080 </dd>
1081 <dt><tt class="docutils literal"><span class="pre">use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet</span></tt></dt>
1082 <dd>Hide message when performing such automatic upgrade.</dd>
1083 <dt><tt class="docutils literal">usestore</tt></dt>
1084 <dd><p class="first">Enable or disable the &quot;store&quot; repository format which improves
1085 compatibility with systems that fold case or otherwise mangle
1086 filenames. Disabling this option will allow you to store longer filenames
1087 in some situations at the expense of compatibility.</p>
1088 <p>Repositories with this on-disk format require Mercurial version 0.9.4.</p>
1089 <p class="last">Enabled by default.</p>
1090 </dd>
1091 <dt><tt class="docutils literal"><span class="pre">sparse-revlog</span></tt></dt>
1092 <dd><p class="first">Enable or disable the <tt class="docutils literal"><span class="pre">sparse-revlog</span></tt> delta strategy. This format improves
1093 delta re-use inside revlog. For very branchy repositories, it results in a
1094 smaller store. For repositories with many revisions, it also helps
1095 performance (by using shortened delta chains.)</p>
1096 <p>Repositories with this on-disk format require Mercurial version 4.7</p>
1097 <p>Implies <cite>usegeneraldelta</cite>.</p>
1098 <p class="last">Enabled by default.</p>
1099 </dd>
1100 <dt><tt class="docutils literal"><span class="pre">revlog-compression</span></tt></dt>
1101 <dd><p class="first">Compression algorithm used by revlog. Supported values are <cite>zlib</cite> and
1102 <cite>zstd</cite>. The <cite>zlib</cite> engine is the historical default of Mercurial. <cite>zstd</cite> is
1103 a newer format that is usually a net win over <cite>zlib</cite>, operating faster at
1104 better compression rates. Use <cite>zstd</cite> to reduce CPU usage. Multiple values
1105 can be specified, the first available one will be used.</p>
1106 <p>On some systems, the Mercurial installation may lack <cite>zstd</cite> support.</p>
1107 <p class="last">Default is <cite>zstd</cite> if available, <cite>zlib</cite> otherwise.</p>
1108 </dd>
1109 <dt><tt class="docutils literal"><span class="pre">bookmarks-in-store</span></tt></dt>
1110 <dd><p class="first">Store bookmarks in .hg/store/. This means that bookmarks are shared when
1111 using <cite>hg share</cite> regardless of the <cite>-B</cite> option.</p>
1112 <p>Repositories with this on-disk format require Mercurial version 5.1.</p>
1113 <p class="last">Disabled by default.</p>
1114 </dd>
1115 </dl>
1116 </div>
1117 <div class="section" id="graph">
1118 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">graph</tt></a></h2>
1119 <p>Web graph view configuration. This section let you change graph
1120 elements display properties by branches, for instance to make the
1121 <tt class="docutils literal">default</tt> branch stand out.</p>
1122 <p>Each line has the following format:</p>
1123 <pre class="literal-block">
1124 &lt;branch&gt;.&lt;argument&gt; = &lt;value&gt;
1125 </pre>
1126 <p>where <tt class="docutils literal">&lt;branch&gt;</tt> is the name of the branch being
1127 customized. Example:</p>
1128 <pre class="literal-block">
1129 [graph]
1130 # 2px width
1131 default.width = 2
1132 # red color
1133 default.color = FF0000
1134 </pre>
1135 <p>Supported arguments:</p>
1136 <dl class="docutils">
1137 <dt><tt class="docutils literal">width</tt></dt>
1138 <dd>Set branch edges width in pixels.</dd>
1139 <dt><tt class="docutils literal">color</tt></dt>
1140 <dd>Set branch edges color in hexadecimal RGB notation.</dd>
1141 </dl>
1142 </div>
1143 <div class="section" id="hooks">
1144 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">hooks</tt></a></h2>
1145 <p>Commands or Python functions that get automatically executed by
1146 various actions such as starting or finishing a commit. Multiple
1147 hooks can be run for the same action by appending a suffix to the
1148 action. Overriding a site-wide hook can be done by changing its
1149 value or setting it to an empty string. Hooks can be prioritized
1150 by adding a prefix of <tt class="docutils literal">priority.</tt> to the hook name on a new line
1151 and setting the priority. The default priority is 0.</p>
1152 <p>Example <tt class="docutils literal">.hg/hgrc</tt>:</p>
1153 <pre class="literal-block">
1154 [hooks]
1155 # update working directory after adding changesets
1156 changegroup.update = hg update
1157 # do not use the site-wide hook
1158 incoming =
1159 incoming.email = /my/email/hook
1160 incoming.autobuild = /my/build/hook
1161 # force autobuild hook to run before other incoming hooks
1162 priority.incoming.autobuild = 1
1163 ### control HGPLAIN setting when running autobuild hook
1164 # HGPLAIN always set (default from Mercurial 5.7)
1165 incoming.autobuild:run-with-plain = yes
1166 # HGPLAIN never set
1167 incoming.autobuild:run-with-plain = no
1168 # HGPLAIN inherited from environment (default before Mercurial 5.7)
1169 incoming.autobuild:run-with-plain = auto
1170 </pre>
1171 <p>Most hooks are run with environment variables set that give useful
1172 additional information. For each hook below, the environment variables
1173 it is passed are listed with names in the form <tt class="docutils literal">$HG_foo</tt>. The
1174 <tt class="docutils literal">$HG_HOOKTYPE</tt> and <tt class="docutils literal">$HG_HOOKNAME</tt> variables are set for all hooks.
1175 They contain the type of hook which triggered the run and the full name
1176 of the hook in the config, respectively. In the example above, this will
1177 be <tt class="docutils literal">$HG_HOOKTYPE=incoming</tt> and <tt class="docutils literal">$HG_HOOKNAME=incoming.email</tt>.</p>
1178 <div class="windows docutils container">
1179 <p>Some basic Unix syntax can be enabled for portability, including <tt class="docutils literal">$VAR</tt>
1180 and <tt class="docutils literal">${VAR}</tt> style variables. A <tt class="docutils literal">~</tt> followed by <tt class="docutils literal">\</tt> or <tt class="docutils literal">/</tt> will
1181 be expanded to <tt class="docutils literal">%USERPROFILE%</tt> to simulate a subset of tilde expansion
1182 on Unix. To use a literal <tt class="docutils literal">$</tt> or <tt class="docutils literal">~</tt>, it must be escaped with a back
1183 slash or inside of a strong quote. Strong quotes will be replaced by
1184 double quotes after processing.</p>
1185 <p>This feature is enabled by adding a prefix of <tt class="docutils literal">tonative.</tt> to the hook
1186 name on a new line, and setting it to <tt class="docutils literal">True</tt>. For example:</p>
1187 <pre class="literal-block">
1188 [hooks]
1189 incoming.autobuild = /my/build/hook
1190 # enable translation to cmd.exe syntax for autobuild hook
1191 tonative.incoming.autobuild = True
1192 </pre>
1193 </div>
1194 <dl class="docutils">
1195 <dt><tt class="docutils literal">changegroup</tt></dt>
1196 <dd>Run after a changegroup has been added via push, pull or unbundle. The ID of
1197 the first new changeset is in <tt class="docutils literal">$HG_NODE</tt> and last is in <tt class="docutils literal">$HG_NODE_LAST</tt>.
1198 The URL from which changes came is in <tt class="docutils literal">$HG_URL</tt>.</dd>
1199 <dt><tt class="docutils literal">commit</tt></dt>
1200 <dd>Run after a changeset has been created in the local repository. The ID
1201 of the newly created changeset is in <tt class="docutils literal">$HG_NODE</tt>. Parent changeset
1202 IDs are in <tt class="docutils literal">$HG_PARENT1</tt> and <tt class="docutils literal">$HG_PARENT2</tt>.</dd>
1203 <dt><tt class="docutils literal">incoming</tt></dt>
1204 <dd>Run after a changeset has been pulled, pushed, or unbundled into
1205 the local repository. The ID of the newly arrived changeset is in
1206 <tt class="docutils literal">$HG_NODE</tt>. The URL that was source of the changes is in <tt class="docutils literal">$HG_URL</tt>.</dd>
1207 <dt><tt class="docutils literal">outgoing</tt></dt>
1208 <dd>Run after sending changes from the local repository to another. The ID of
1209 first changeset sent is in <tt class="docutils literal">$HG_NODE</tt>. The source of operation is in
1210 <tt class="docutils literal">$HG_SOURCE</tt>. Also see <a class="reference external" href="hgrc.5.html#hooks"><tt class="docutils literal">hg help config.hooks.preoutgoing</tt></a>.</dd>
1211 <dt><tt class="docutils literal"><span class="pre">post-&lt;command&gt;</span></tt></dt>
1212 <dd>Run after successful invocations of the associated command. The
1213 contents of the command line are passed as <tt class="docutils literal">$HG_ARGS</tt> and the result
1214 code in <tt class="docutils literal">$HG_RESULT</tt>. Parsed command line arguments are passed as
1215 <tt class="docutils literal">$HG_PATS</tt> and <tt class="docutils literal">$HG_OPTS</tt>. These contain string representations of
1216 the python data internally passed to &lt;command&gt;. <tt class="docutils literal">$HG_OPTS</tt> is a
1217 dictionary of options (with unspecified options set to their defaults).
1218 <tt class="docutils literal">$HG_PATS</tt> is a list of arguments. Hook failure is ignored.</dd>
1219 <dt><tt class="docutils literal"><span class="pre">fail-&lt;command&gt;</span></tt></dt>
1220 <dd>Run after a failed invocation of an associated command. The contents
1221 of the command line are passed as <tt class="docutils literal">$HG_ARGS</tt>. Parsed command line
1222 arguments are passed as <tt class="docutils literal">$HG_PATS</tt> and <tt class="docutils literal">$HG_OPTS</tt>. These contain
1223 string representations of the python data internally passed to
1224 &lt;command&gt;. <tt class="docutils literal">$HG_OPTS</tt> is a dictionary of options (with unspecified
1225 options set to their defaults). <tt class="docutils literal">$HG_PATS</tt> is a list of arguments.
1226 Hook failure is ignored.</dd>
1227 <dt><tt class="docutils literal"><span class="pre">pre-&lt;command&gt;</span></tt></dt>
1228 <dd>Run before executing the associated command. The contents of the
1229 command line are passed as <tt class="docutils literal">$HG_ARGS</tt>. Parsed command line arguments
1230 are passed as <tt class="docutils literal">$HG_PATS</tt> and <tt class="docutils literal">$HG_OPTS</tt>. These contain string
1231 representations of the data internally passed to &lt;command&gt;. <tt class="docutils literal">$HG_OPTS</tt>
1232 is a dictionary of options (with unspecified options set to their
1233 defaults). <tt class="docutils literal">$HG_PATS</tt> is a list of arguments. If the hook returns
1234 failure, the command doesn't execute and Mercurial returns the failure
1235 code.</dd>
1236 <dt><tt class="docutils literal">prechangegroup</tt></dt>
1237 <dd>Run before a changegroup is added via push, pull or unbundle. Exit
1238 status 0 allows the changegroup to proceed. A non-zero status will
1239 cause the push, pull or unbundle to fail. The URL from which changes
1240 will come is in <tt class="docutils literal">$HG_URL</tt>.</dd>
1241 <dt><tt class="docutils literal">precommit</tt></dt>
1242 <dd>Run before starting a local commit. Exit status 0 allows the
1243 commit to proceed. A non-zero status will cause the commit to fail.
1244 Parent changeset IDs are in <tt class="docutils literal">$HG_PARENT1</tt> and <tt class="docutils literal">$HG_PARENT2</tt>.</dd>
1245 <dt><tt class="docutils literal">prelistkeys</tt></dt>
1246 <dd>Run before listing pushkeys (like bookmarks) in the
1247 repository. A non-zero status will cause failure. The key namespace is
1248 in <tt class="docutils literal">$HG_NAMESPACE</tt>.</dd>
1249 <dt><tt class="docutils literal">preoutgoing</tt></dt>
1250 <dd>Run before collecting changes to send from the local repository to
1251 another. A non-zero status will cause failure. This lets you prevent
1252 pull over HTTP or SSH. It can also prevent propagating commits (via
1253 local pull, push (outbound) or bundle commands), but not completely,
1254 since you can just copy files instead. The source of operation is in
1255 <tt class="docutils literal">$HG_SOURCE</tt>. If &quot;serve&quot;, the operation is happening on behalf of a remote
1256 SSH or HTTP repository. If &quot;push&quot;, &quot;pull&quot; or &quot;bundle&quot;, the operation
1257 is happening on behalf of a repository on same system.</dd>
1258 <dt><tt class="docutils literal">prepushkey</tt></dt>
1259 <dd>Run before a pushkey (like a bookmark) is added to the
1260 repository. A non-zero status will cause the key to be rejected. The
1261 key namespace is in <tt class="docutils literal">$HG_NAMESPACE</tt>, the key is in <tt class="docutils literal">$HG_KEY</tt>,
1262 the old value (if any) is in <tt class="docutils literal">$HG_OLD</tt>, and the new value is in
1263 <tt class="docutils literal">$HG_NEW</tt>.</dd>
1264 <dt><tt class="docutils literal">pretag</tt></dt>
1265 <dd>Run before creating a tag. Exit status 0 allows the tag to be
1266 created. A non-zero status will cause the tag to fail. The ID of the
1267 changeset to tag is in <tt class="docutils literal">$HG_NODE</tt>. The name of tag is in <tt class="docutils literal">$HG_TAG</tt>. The
1268 tag is local if <tt class="docutils literal">$HG_LOCAL=1</tt>, or in the repository if <tt class="docutils literal">$HG_LOCAL=0</tt>.</dd>
1269 <dt><tt class="docutils literal"><span class="pre">pretransmit-inline-clone-bundle</span></tt></dt>
1270 <dd>Run before transferring an inline clonebundle to the peer.
1271 If the exit status is 0, the inline clonebundle will be allowed to be
1272 transferred. A non-zero status will cause the transfer to fail.
1273 The path of the inline clonebundle is in <tt class="docutils literal">$HG_CLONEBUNDLEPATH</tt>.</dd>
1274 <dt><tt class="docutils literal">pretxnopen</tt></dt>
1275 <dd>Run before any new repository transaction is open. The reason for the
1276 transaction will be in <tt class="docutils literal">$HG_TXNNAME</tt>, and a unique identifier for the
1277 transaction will be in <tt class="docutils literal">$HG_TXNID</tt>. A non-zero status will prevent the
1278 transaction from being opened.</dd>
1279 <dt><tt class="docutils literal">pretxnclose</tt></dt>
1280 <dd>Run right before the transaction is actually finalized. Any repository change
1281 will be visible to the hook program. This lets you validate the transaction
1282 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1283 status will cause the transaction to be rolled back. The reason for the
1284 transaction opening will be in <tt class="docutils literal">$HG_TXNNAME</tt>, and a unique identifier for
1285 the transaction will be in <tt class="docutils literal">$HG_TXNID</tt>. The rest of the available data will
1286 vary according the transaction type. Changes unbundled to the repository will
1287 add <tt class="docutils literal">$HG_URL</tt> and <tt class="docutils literal">$HG_SOURCE</tt>. New changesets will add <tt class="docutils literal">$HG_NODE</tt> (the
1288 ID of the first added changeset), <tt class="docutils literal">$HG_NODE_LAST</tt> (the ID of the last added
1289 changeset). Bookmark and phase changes will set <tt class="docutils literal">$HG_BOOKMARK_MOVED</tt> and
1290 <tt class="docutils literal">$HG_PHASES_MOVED</tt> to <tt class="docutils literal">1</tt> respectively. The number of new obsmarkers, if
1291 any, will be in <tt class="docutils literal">$HG_NEW_OBSMARKERS</tt>, etc.</dd>
1292 <dt><tt class="docutils literal"><span class="pre">pretxnclose-bookmark</span></tt></dt>
1293 <dd>Run right before a bookmark change is actually finalized. Any repository
1294 change will be visible to the hook program. This lets you validate the
1295 transaction content or change it. Exit status 0 allows the commit to
1296 proceed. A non-zero status will cause the transaction to be rolled back.
1297 The name of the bookmark will be available in <tt class="docutils literal">$HG_BOOKMARK</tt>, the new
1298 bookmark location will be available in <tt class="docutils literal">$HG_NODE</tt> while the previous
1299 location will be available in <tt class="docutils literal">$HG_OLDNODE</tt>. In case of a bookmark
1300 creation <tt class="docutils literal">$HG_OLDNODE</tt> will be empty. In case of deletion <tt class="docutils literal">$HG_NODE</tt>
1301 will be empty.
1302 In addition, the reason for the transaction opening will be in
1303 <tt class="docutils literal">$HG_TXNNAME</tt>, and a unique identifier for the transaction will be in
1304 <tt class="docutils literal">$HG_TXNID</tt>.</dd>
1305 <dt><tt class="docutils literal"><span class="pre">pretxnclose-phase</span></tt></dt>
1306 <dd>Run right before a phase change is actually finalized. Any repository change
1307 will be visible to the hook program. This lets you validate the transaction
1308 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1309 status will cause the transaction to be rolled back. The hook is called
1310 multiple times, once for each revision affected by a phase change.
1311 The affected node is available in <tt class="docutils literal">$HG_NODE</tt>, the phase in <tt class="docutils literal">$HG_PHASE</tt>
1312 while the previous <tt class="docutils literal">$HG_OLDPHASE</tt>. In case of new node, <tt class="docutils literal">$HG_OLDPHASE</tt>
1313 will be empty. In addition, the reason for the transaction opening will be in
1314 <tt class="docutils literal">$HG_TXNNAME</tt>, and a unique identifier for the transaction will be in
1315 <tt class="docutils literal">$HG_TXNID</tt>. The hook is also run for newly added revisions. In this case
1316 the <tt class="docutils literal">$HG_OLDPHASE</tt> entry will be empty.</dd>
1317 <dt><tt class="docutils literal">txnclose</tt></dt>
1318 <dd>Run after any repository transaction has been committed. At this
1319 point, the transaction can no longer be rolled back. The hook will run
1320 after the lock is released. See <a class="reference external" href="hgrc.5.html#hooks"><tt class="docutils literal">hg help config.hooks.pretxnclose</tt></a> for
1321 details about available variables.</dd>
1322 <dt><tt class="docutils literal"><span class="pre">txnclose-bookmark</span></tt></dt>
1323 <dd>Run after any bookmark change has been committed. At this point, the
1324 transaction can no longer be rolled back. The hook will run after the lock
1325 is released. See <a class="reference external" href="hgrc.5.html#hooks"><tt class="docutils literal">hg help <span class="pre">config.hooks.pretxnclose-bookmark</span></tt></a> for details
1326 about available variables.</dd>
1327 <dt><tt class="docutils literal"><span class="pre">txnclose-phase</span></tt></dt>
1328 <dd>Run after any phase change has been committed. At this point, the
1329 transaction can no longer be rolled back. The hook will run after the lock
1330 is released. See <a class="reference external" href="hgrc.5.html#hooks"><tt class="docutils literal">hg help <span class="pre">config.hooks.pretxnclose-phase</span></tt></a> for details about
1331 available variables.</dd>
1332 <dt><tt class="docutils literal">txnabort</tt></dt>
1333 <dd>Run when a transaction is aborted. See <a class="reference external" href="hgrc.5.html#hooks"><tt class="docutils literal">hg help config.hooks.pretxnclose</tt></a>
1334 for details about available variables.</dd>
1335 <dt><tt class="docutils literal">pretxnchangegroup</tt></dt>
1336 <dd>Run after a changegroup has been added via push, pull or unbundle, but before
1337 the transaction has been committed. The changegroup is visible to the hook
1338 program. This allows validation of incoming changes before accepting them.
1339 The ID of the first new changeset is in <tt class="docutils literal">$HG_NODE</tt> and last is in
1340 <tt class="docutils literal">$HG_NODE_LAST</tt>. Exit status 0 allows the transaction to commit. A non-zero
1341 status will cause the transaction to be rolled back, and the push, pull or
1342 unbundle will fail. The URL that was the source of changes is in <tt class="docutils literal">$HG_URL</tt>.</dd>
1343 <dt><tt class="docutils literal">pretxncommit</tt></dt>
1344 <dd>Run after a changeset has been created, but before the transaction is
1345 committed. The changeset is visible to the hook program. This allows
1346 validation of the commit message and changes. Exit status 0 allows the
1347 commit to proceed. A non-zero status will cause the transaction to
1348 be rolled back. The ID of the new changeset is in <tt class="docutils literal">$HG_NODE</tt>. The parent
1349 changeset IDs are in <tt class="docutils literal">$HG_PARENT1</tt> and <tt class="docutils literal">$HG_PARENT2</tt>.</dd>
1350 <dt><tt class="docutils literal">preupdate</tt></dt>
1351 <dd>Run before updating the working directory. Exit status 0 allows
1352 the update to proceed. A non-zero status will prevent the update.
1353 The changeset ID of first new parent is in <tt class="docutils literal">$HG_PARENT1</tt>. If updating to a
1354 merge, the ID of second new parent is in <tt class="docutils literal">$HG_PARENT2</tt>.</dd>
1355 <dt><tt class="docutils literal">listkeys</tt></dt>
1356 <dd>Run after listing pushkeys (like bookmarks) in the repository. The
1357 key namespace is in <tt class="docutils literal">$HG_NAMESPACE</tt>. <tt class="docutils literal">$HG_VALUES</tt> is a
1358 dictionary containing the keys and values.</dd>
1359 <dt><tt class="docutils literal">pushkey</tt></dt>
1360 <dd>Run after a pushkey (like a bookmark) is added to the
1361 repository. The key namespace is in <tt class="docutils literal">$HG_NAMESPACE</tt>, the key is in
1362 <tt class="docutils literal">$HG_KEY</tt>, the old value (if any) is in <tt class="docutils literal">$HG_OLD</tt>, and the new
1363 value is in <tt class="docutils literal">$HG_NEW</tt>.</dd>
1364 <dt><tt class="docutils literal">tag</tt></dt>
1365 <dd>Run after a tag is created. The ID of the tagged changeset is in <tt class="docutils literal">$HG_NODE</tt>.
1366 The name of tag is in <tt class="docutils literal">$HG_TAG</tt>. The tag is local if <tt class="docutils literal">$HG_LOCAL=1</tt>, or in
1367 the repository if <tt class="docutils literal">$HG_LOCAL=0</tt>.</dd>
1368 <dt><tt class="docutils literal">update</tt></dt>
1369 <dd>Run after updating the working directory. The changeset ID of first
1370 new parent is in <tt class="docutils literal">$HG_PARENT1</tt>. If updating to a merge, the ID of second new
1371 parent is in <tt class="docutils literal">$HG_PARENT2</tt>. If the update succeeded, <tt class="docutils literal">$HG_ERROR=0</tt>. If the
1372 update failed (e.g. because conflicts were not resolved), <tt class="docutils literal">$HG_ERROR=1</tt>.</dd>
1373 <dt><tt class="docutils literal">prelock</tt></dt>
1374 <dd>run before the store lock is taken, mostly used for test and debug.</dd>
1375 <dt><tt class="docutils literal">prewlock</tt></dt>
1376 <dd>run before the working copy lock is taken, mostly used for test and debug.</dd>
1377 </dl>
1378 <div class="admonition note">
1379 <p class="first admonition-title">Note</p>
1380 <p class="last">It is generally better to use standard hooks rather than the
1381 generic pre- and post- command hooks, as they are guaranteed to be
1382 called in the appropriate contexts for influencing transactions.
1383 Also, hooks like &quot;commit&quot; will be called in all contexts that
1384 generate a commit (e.g. tag) and not just the commit command.</p>
1385 </div>
1386 <div class="admonition note">
1387 <p class="first admonition-title">Note</p>
1388 <p class="last">Environment variables with empty values may not be passed to
1389 hooks on platforms such as Windows. As an example, <tt class="docutils literal">$HG_PARENT2</tt>
1390 will have an empty value under Unix-like platforms for non-merge
1391 changesets, while it will not be available at all under Windows.</p>
1392 </div>
1393 <p>The syntax for Python hooks is as follows:</p>
1394 <pre class="literal-block">
1395 hookname = python:modulename.submodule.callable
1396 hookname = python:/path/to/python/module.py:callable
1397 </pre>
1398 <p>Python hooks are run within the Mercurial process. Each hook is
1399 called with at least three keyword arguments: a ui object (keyword
1400 <tt class="docutils literal">ui</tt>), a repository object (keyword <tt class="docutils literal">repo</tt>), and a <tt class="docutils literal">hooktype</tt>
1401 keyword that tells what kind of hook is used. Arguments listed as
1402 environment variables above are passed as keyword arguments, with no
1403 <tt class="docutils literal">HG_</tt> prefix, and names in lower case.</p>
1404 <p>If a Python hook returns a &quot;true&quot; value or raises an exception, this
1405 is treated as a failure.</p>
1406 </div>
1407 <div class="section" id="hostfingerprints">
1408 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">hostfingerprints</tt></a></h2>
1409 <p>(Deprecated. Use <tt class="docutils literal">[hostsecurity]</tt>'s <tt class="docutils literal">fingerprints</tt> options instead.)</p>
1410 <p>Fingerprints of the certificates of known HTTPS servers.</p>
1411 <p>A HTTPS connection to a server with a fingerprint configured here will
1412 only succeed if the servers certificate matches the fingerprint.
1413 This is very similar to how ssh known hosts works.</p>
1414 <p>The fingerprint is the SHA-1 hash value of the DER encoded certificate.
1415 Multiple values can be specified (separated by spaces or commas). This can
1416 be used to define both old and new fingerprints while a host transitions
1417 to a new certificate.</p>
1418 <p>The CA chain and web.cacerts is not used for servers with a fingerprint.</p>
1419 <p>For example:</p>
1420 <pre class="literal-block">
1421 [hostfingerprints]
1422 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1423 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1424 </pre>
1425 </div>
1426 <div class="section" id="hostsecurity">
1427 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">hostsecurity</tt></a></h2>
1428 <p>Used to specify global and per-host security settings for connecting to
1429 other machines.</p>
1430 <p>The following options control default behavior for all hosts.</p>
1431 <dl class="docutils">
1432 <dt><tt class="docutils literal">ciphers</tt></dt>
1433 <dd><p class="first">Defines the cryptographic ciphers to use for connections.</p>
1434 <p>Value must be a valid OpenSSL Cipher List Format as documented at
1435 <a class="reference external" href="https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT">https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT</a>.</p>
1436 <p>This setting is for advanced users only. Setting to incorrect values
1437 can significantly lower connection security or decrease performance.
1438 You have been warned.</p>
1439 <p class="last">This option requires Python 2.7.</p>
1440 </dd>
1441 <dt><tt class="docutils literal">minimumprotocol</tt></dt>
1442 <dd><p class="first">Defines the minimum channel encryption protocol to use in the client.</p>
1443 <p>By default, the highest version of TLS supported by both client and server
1444 is used.</p>
1445 <p>Allowed values are: <tt class="docutils literal">tls1.0</tt>, <tt class="docutils literal">tls1.1</tt>, <tt class="docutils literal">tls1.2</tt>, <tt class="docutils literal">tls1.3</tt>.</p>
1446 <p>Depending on the version of Python being used, not all of these values may
1447 be available. See <tt class="docutils literal">hg debuginstall</tt> for the values supported by the
1448 current installation.</p>
1449 <p class="last">When running a Python that supports modern TLS versions, the default is
1450 <tt class="docutils literal">tls1.2</tt>. <tt class="docutils literal">tls1.0</tt> and <tt class="docutils literal">tls1.1</tt> can still be used to allow TLS 1.0
1451 or TLS 1.1 respectively, if supported by Python. However, this weakens
1452 security and should only be used as a feature of last resort if a server
1453 does not support TLS 1.2+.</p>
1454 </dd>
1455 </dl>
1456 <p>Options in the <tt class="docutils literal">[hostsecurity]</tt> section can have the form
1457 <tt class="docutils literal">hostname</tt>:<tt class="docutils literal">setting</tt>. This allows multiple settings to be defined on a
1458 per-host basis.</p>
1459 <p>The following per-host settings can be defined.</p>
1460 <dl class="docutils">
1461 <dt><tt class="docutils literal">ciphers</tt></dt>
1462 <dd>This behaves like <tt class="docutils literal">ciphers</tt> as described above except it only applies
1463 to the host on which it is defined.</dd>
1464 <dt><tt class="docutils literal">fingerprints</tt></dt>
1465 <dd><p class="first">A list of hashes of the DER encoded peer/remote certificate. Values have
1466 the form <tt class="docutils literal">algorithm</tt>:<tt class="docutils literal">fingerprint</tt>. e.g.
1467 <tt class="docutils literal">sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2</tt>.
1468 In addition, colons (<tt class="docutils literal">:</tt>) can appear in the fingerprint part.</p>
1469 <p>The following algorithms/prefixes are supported: <tt class="docutils literal">sha1</tt>, <tt class="docutils literal">sha256</tt>,
1470 <tt class="docutils literal">sha512</tt>.</p>
1471 <p>Use of <tt class="docutils literal">sha256</tt> or <tt class="docutils literal">sha512</tt> is preferred.</p>
1472 <p>If a fingerprint is specified, the CA chain is not validated for this
1473 host and Mercurial will require the remote certificate to match one
1474 of the fingerprints specified. This means if the server updates its
1475 certificate, Mercurial will abort until a new fingerprint is defined.
1476 This can provide stronger security than traditional CA-based validation
1477 at the expense of convenience.</p>
1478 <p class="last">This option takes precedence over <tt class="docutils literal">verifycertsfile</tt>.</p>
1479 </dd>
1480 <dt><tt class="docutils literal">minimumprotocol</tt></dt>
1481 <dd>This behaves like <tt class="docutils literal">minimumprotocol</tt> as described above except it
1482 only applies to the host on which it is defined.</dd>
1483 <dt><tt class="docutils literal">verifycertsfile</tt></dt>
1484 <dd><p class="first">Path to file a containing a list of PEM encoded certificates used to
1485 verify the server certificate. Environment variables and <tt class="docutils literal">~user</tt>
1486 constructs are expanded in the filename.</p>
1487 <p>The server certificate or the certificate's certificate authority (CA)
1488 must match a certificate from this file or certificate verification
1489 will fail and connections to the server will be refused.</p>
1490 <p>If defined, only certificates provided by this file will be used:
1491 <tt class="docutils literal">web.cacerts</tt> and any system/default certificates will not be
1492 used.</p>
1493 <p>This option has no effect if the per-host <tt class="docutils literal">fingerprints</tt> option
1494 is set.</p>
1495 <p>The format of the file is as follows:</p>
1496 <pre class="last literal-block">
1497 -----BEGIN CERTIFICATE-----
1498 ... (certificate in base64 PEM encoding) ...
1499 -----END CERTIFICATE-----
1500 -----BEGIN CERTIFICATE-----
1501 ... (certificate in base64 PEM encoding) ...
1502 -----END CERTIFICATE-----
1503 </pre>
1504 </dd>
1505 </dl>
1506 <p>For example:</p>
1507 <pre class="literal-block">
1508 [hostsecurity]
1509 hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
1510 hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1511 hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2
1512 foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem
1513 </pre>
1514 <p>To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1
1515 when connecting to <tt class="docutils literal">hg.example.com</tt>:</p>
1516 <pre class="literal-block">
1517 [hostsecurity]
1518 minimumprotocol = tls1.2
1519 hg.example.com:minimumprotocol = tls1.1
1520 </pre>
1521 </div>
1522 <div class="section" id="http-proxy">
1523 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">http_proxy</tt></a></h2>
1524 <p>Used to access web-based Mercurial repositories through a HTTP
1525 proxy.</p>
1526 <dl class="docutils">
1527 <dt><tt class="docutils literal">host</tt></dt>
1528 <dd>Host name and (optional) port of the proxy server, for example
1529 &quot;myproxy:8000&quot;.</dd>
1530 <dt><tt class="docutils literal">no</tt></dt>
1531 <dd>Optional. Comma-separated list of host names that should bypass
1532 the proxy.</dd>
1533 <dt><tt class="docutils literal">passwd</tt></dt>
1534 <dd>Optional. Password to authenticate with at the proxy server.</dd>
1535 <dt><tt class="docutils literal">user</tt></dt>
1536 <dd>Optional. User name to authenticate with at the proxy server.</dd>
1537 <dt><tt class="docutils literal">always</tt></dt>
1538 <dd>Optional. Always use the proxy, even for localhost and any entries
1539 in <tt class="docutils literal">http_proxy.no</tt>. (default: False)</dd>
1540 </dl>
1541 </div>
1542 <div class="section" id="http">
1543 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">http</tt></a></h2>
1544 <p>Used to configure access to Mercurial repositories via HTTP.</p>
1545 <dl class="docutils">
1546 <dt><tt class="docutils literal">timeout</tt></dt>
1547 <dd>If set, blocking operations will timeout after that many seconds.
1548 (default: None)</dd>
1549 </dl>
1550 </div>
1551 <div class="section" id="merge">
1552 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">merge</tt></a></h2>
1553 <p>This section specifies behavior during merges and updates.</p>
1554 <dl class="docutils">
1555 <dt><tt class="docutils literal">checkignored</tt></dt>
1556 <dd>Controls behavior when an ignored file on disk has the same name as a tracked
1557 file in the changeset being merged or updated to, and has different
1558 contents. Options are <tt class="docutils literal">abort</tt>, <tt class="docutils literal">warn</tt> and <tt class="docutils literal">ignore</tt>. With <tt class="docutils literal">abort</tt>,
1559 abort on such files. With <tt class="docutils literal">warn</tt>, warn on such files and back them up as
1560 <tt class="docutils literal">.orig</tt>. With <tt class="docutils literal">ignore</tt>, don't print a warning and back them up as
1561 <tt class="docutils literal">.orig</tt>. (default: <tt class="docutils literal">abort</tt>)</dd>
1562 <dt><tt class="docutils literal">checkunknown</tt></dt>
1563 <dd>Controls behavior when an unknown file that isn't ignored has the same name
1564 as a tracked file in the changeset being merged or updated to, and has
1565 different contents. Similar to <tt class="docutils literal">merge.checkignored</tt>, except for files that
1566 are not ignored. (default: <tt class="docutils literal">abort</tt>)</dd>
1567 <dt><tt class="docutils literal"><span class="pre">on-failure</span></tt></dt>
1568 <dd>When set to <tt class="docutils literal">continue</tt> (the default), the merge process attempts to
1569 merge all unresolved files using the merge chosen tool, regardless of
1570 whether previous file merge attempts during the process succeeded or not.
1571 Setting this to <tt class="docutils literal">prompt</tt> will prompt after any merge failure continue
1572 or halt the merge process. Setting this to <tt class="docutils literal">halt</tt> will automatically
1573 halt the merge process on any merge tool failure. The merge process
1574 can be restarted by using the <tt class="docutils literal">resolve</tt> command. When a merge is
1575 halted, the repository is left in a normal <tt class="docutils literal">unresolved</tt> merge state.
1576 (default: <tt class="docutils literal">continue</tt>)</dd>
1577 <dt><tt class="docutils literal"><span class="pre">strict-capability-check</span></tt></dt>
1578 <dd>Whether capabilities of internal merge tools are checked strictly
1579 or not, while examining rules to decide merge tool to be used.
1580 (default: False)</dd>
1581 </dl>
1582 </div>
1583 <div class="section" id="merge-patterns">
1584 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal"><span class="pre">merge-patterns</span></tt></a></h2>
1585 <p>This section specifies merge tools to associate with particular file
1586 patterns. Tools matched here will take precedence over the default
1587 merge tool. Patterns are globs by default, rooted at the repository
1588 root.</p>
1589 <p>Example:</p>
1590 <pre class="literal-block">
1591 [merge-patterns]
1592 **.c = kdiff3
1593 **.jpg = myimgmerge
1594 </pre>
1595 </div>
1596 <div class="section" id="merge-tools">
1597 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal"><span class="pre">merge-tools</span></tt></a></h2>
1598 <p>This section configures external merge tools to use for file-level
1599 merges. This section has likely been preconfigured at install time.
1600 Use <a class="reference external" href="hg-config.html"><tt class="docutils literal">hg config <span class="pre">merge-tools</span></tt></a> to check the existing configuration.
1601 Also see <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a> for more details.</p>
1602 <p>Example <tt class="docutils literal"><span class="pre">~/.hgrc</span></tt>:</p>
1603 <pre class="literal-block">
1604 [merge-tools]
1605 # Override stock tool location
1606 kdiff3.executable = ~/bin/kdiff3
1607 # Specify command line
1608 kdiff3.args = $base $local $other -o $output
1609 # Give higher priority
1610 kdiff3.priority = 1
1611
1612 # Changing the priority of preconfigured tool
1613 meld.priority = 0
1614
1615 # Disable a preconfigured tool
1616 vimdiff.disabled = yes
1617
1618 # Define new tool
1619 myHtmlTool.args = -m $local $other $base $output
1620 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
1621 myHtmlTool.priority = 1
1622 </pre>
1623 <p>Supported arguments:</p>
1624 <dl class="docutils">
1625 <dt><tt class="docutils literal">priority</tt></dt>
1626 <dd>The priority in which to evaluate this tool.
1627 (default: 0)</dd>
1628 <dt><tt class="docutils literal">executable</tt></dt>
1629 <dd><p class="first">Either just the name of the executable or its pathname.</p>
1630 <div class="windows docutils container">
1631 On Windows, the path can use environment variables with ${ProgramFiles}
1632 syntax.</div>
1633 <p class="last">(default: the tool name)</p>
1634 </dd>
1635 <dt><tt class="docutils literal">args</tt></dt>
1636 <dd><p class="first">The arguments to pass to the tool executable. You can refer to the
1637 files being merged as well as the output file through these
1638 variables: <tt class="docutils literal">$base</tt>, <tt class="docutils literal">$local</tt>, <tt class="docutils literal">$other</tt>, <tt class="docutils literal">$output</tt>.</p>
1639 <p>The meaning of <tt class="docutils literal">$local</tt> and <tt class="docutils literal">$other</tt> can vary depending on which action is
1640 being performed. During an update or merge, <tt class="docutils literal">$local</tt> represents the original
1641 state of the file, while <tt class="docutils literal">$other</tt> represents the commit you are updating to or
1642 the commit you are merging with. During a rebase, <tt class="docutils literal">$local</tt> represents the
1643 destination of the rebase, and <tt class="docutils literal">$other</tt> represents the commit being rebased.</p>
1644 <p class="last">Some operations define custom labels to assist with identifying the revisions,
1645 accessible via <tt class="docutils literal">$labellocal</tt>, <tt class="docutils literal">$labelother</tt>, and <tt class="docutils literal">$labelbase</tt>. If custom
1646 labels are not available, these will be <tt class="docutils literal">local</tt>, <tt class="docutils literal">other</tt>, and <tt class="docutils literal">base</tt>,
1647 respectively.
1648 (default: <tt class="docutils literal">$local $base $other</tt>)</p>
1649 </dd>
1650 <dt><tt class="docutils literal">premerge</tt></dt>
1651 <dd>Attempt to run internal non-interactive 3-way merge tool before
1652 launching external tool. Options are <tt class="docutils literal">true</tt>, <tt class="docutils literal">false</tt>, <tt class="docutils literal">keep</tt>,
1653 <tt class="docutils literal"><span class="pre">keep-merge3</span></tt>, or <tt class="docutils literal"><span class="pre">keep-mergediff</span></tt> (experimental). The <tt class="docutils literal">keep</tt> option
1654 will leave markers in the file if the premerge fails. The <tt class="docutils literal"><span class="pre">keep-merge3</span></tt>
1655 will do the same but include information about the base of the merge in the
1656 marker (see internal :merge3 in <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a>). The
1657 <tt class="docutils literal"><span class="pre">keep-mergediff</span></tt> option is similar but uses a different marker style
1658 (see internal :merge3 in <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a>). (default: True)</dd>
1659 <dt><tt class="docutils literal">binary</tt></dt>
1660 <dd>This tool can merge binary files. (default: False, unless tool
1661 was selected by file pattern match)</dd>
1662 <dt><tt class="docutils literal">symlink</tt></dt>
1663 <dd>This tool can merge symlinks. (default: False)</dd>
1664 <dt><tt class="docutils literal">check</tt></dt>
1665 <dd><p class="first">A list of merge success-checking options:</p>
1666 <dl class="last docutils">
1667 <dt><tt class="docutils literal">changed</tt></dt>
1668 <dd>Ask whether merge was successful when the merged file shows no changes.</dd>
1669 <dt><tt class="docutils literal">conflicts</tt></dt>
1670 <dd>Check whether there are conflicts even though the tool reported success.</dd>
1671 <dt><tt class="docutils literal">prompt</tt></dt>
1672 <dd>Always prompt for merge success, regardless of success reported by tool.</dd>
1673 </dl>
1674 </dd>
1675 <dt><tt class="docutils literal">fixeol</tt></dt>
1676 <dd>Attempt to fix up EOL changes caused by the merge tool.
1677 (default: False)</dd>
1678 <dt><tt class="docutils literal">gui</tt></dt>
1679 <dd>This tool requires a graphical interface to run. (default: False)</dd>
1680 <dt><tt class="docutils literal">mergemarkers</tt></dt>
1681 <dd>Controls whether the labels passed via <tt class="docutils literal">$labellocal</tt>, <tt class="docutils literal">$labelother</tt>, and
1682 <tt class="docutils literal">$labelbase</tt> are <tt class="docutils literal">detailed</tt> (respecting <tt class="docutils literal">mergemarkertemplate</tt>) or
1683 <tt class="docutils literal">basic</tt>. If <tt class="docutils literal">premerge</tt> is <tt class="docutils literal">keep</tt> or <tt class="docutils literal"><span class="pre">keep-merge3</span></tt>, the conflict
1684 markers generated during premerge will be <tt class="docutils literal">detailed</tt> if either this option or
1685 the corresponding option in the <tt class="docutils literal">[ui]</tt> section is <tt class="docutils literal">detailed</tt>.
1686 (default: <tt class="docutils literal">basic</tt>)</dd>
1687 <dt><tt class="docutils literal">mergemarkertemplate</tt></dt>
1688 <dd>This setting can be used to override <tt class="docutils literal">mergemarker</tt> from the
1689 <tt class="docutils literal"><span class="pre">[command-templates]</span></tt> section on a per-tool basis; this applies to the
1690 <tt class="docutils literal">$label</tt>-prefixed variables and to the conflict markers that are generated
1691 if <tt class="docutils literal">premerge</tt> is <tt class="docutils literal">keep` or <span class="pre">``keep-merge3</span></tt>. See the corresponding variable
1692 in <tt class="docutils literal">[ui]</tt> for more information.</dd>
1693 </dl>
1694 <div class="windows docutils container">
1695 <dl class="docutils">
1696 <dt><tt class="docutils literal">regkey</tt></dt>
1697 <dd>Windows registry key which describes install location of this
1698 tool. Mercurial will search for this key first under
1699 <tt class="docutils literal">HKEY_CURRENT_USER</tt> and then under <tt class="docutils literal">HKEY_LOCAL_MACHINE</tt>.
1700 (default: None)</dd>
1701 <dt><tt class="docutils literal">regkeyalt</tt></dt>
1702 <dd>An alternate Windows registry key to try if the first key is not
1703 found. The alternate key uses the same <tt class="docutils literal">regname</tt> and <tt class="docutils literal">regappend</tt>
1704 semantics of the primary key. The most common use for this key
1705 is to search for 32bit applications on 64bit operating systems.
1706 (default: None)</dd>
1707 <dt><tt class="docutils literal">regname</tt></dt>
1708 <dd>Name of value to read from specified registry key.
1709 (default: the unnamed (default) value)</dd>
1710 <dt><tt class="docutils literal">regappend</tt></dt>
1711 <dd>String to append to the value read from the registry, typically
1712 the executable name of the tool.
1713 (default: None)</dd>
1714 </dl>
1715 </div>
1716 </div>
1717 <div class="section" id="pager">
1718 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">pager</tt></a></h2>
1719 <p>Setting used to control when to paginate and with what external tool. See
1720 <a class="reference external" href="topic-pager.html"><tt class="docutils literal">hg help pager</tt></a> for details.</p>
1721 <dl class="docutils">
1722 <dt><tt class="docutils literal">pager</tt></dt>
1723 <dd><p class="first">Define the external tool used as pager.</p>
1724 <p>If no pager is set, Mercurial uses the environment variable $PAGER.
1725 If neither pager.pager, nor $PAGER is set, a default pager will be
1726 used, typically <cite>less</cite> on Unix and <cite>more</cite> on Windows. Example:</p>
1727 <pre class="last literal-block">
1728 [pager]
1729 pager = less -FRX
1730 </pre>
1731 </dd>
1732 <dt><tt class="docutils literal">ignore</tt></dt>
1733 <dd><p class="first">List of commands to disable the pager for. Example:</p>
1734 <pre class="last literal-block">
1735 [pager]
1736 ignore = version, help, update
1737 </pre>
1738 </dd>
1739 </dl>
1740 </div>
1741 <div class="section" id="patch">
1742 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">patch</tt></a></h2>
1743 <p>Settings used when applying patches, for instance through the 'import'
1744 command or with Mercurial Queues extension.</p>
1745 <dl class="docutils">
1746 <dt><tt class="docutils literal">eol</tt></dt>
1747 <dd>When set to 'strict' patch content and patched files end of lines
1748 are preserved. When set to <tt class="docutils literal">lf</tt> or <tt class="docutils literal">crlf</tt>, both files end of
1749 lines are ignored when patching and the result line endings are
1750 normalized to either LF (Unix) or CRLF (Windows). When set to
1751 <tt class="docutils literal">auto</tt>, end of lines are again ignored while patching but line
1752 endings in patched files are normalized to their original setting
1753 on a per-file basis. If target file does not exist or has no end
1754 of line, patch line endings are preserved.
1755 (default: strict)</dd>
1756 <dt><tt class="docutils literal">fuzz</tt></dt>
1757 <dd>The number of lines of 'fuzz' to allow when applying patches. This
1758 controls how much context the patcher is allowed to ignore when
1759 trying to apply a patch.
1760 (default: 2)</dd>
1761 </dl>
1762 </div>
1763 <div class="section" id="paths">
1764 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">paths</tt></a></h2>
1765 <p>Assigns symbolic names and behavior to repositories.</p>
1766 <p>Options are symbolic names defining the URL or directory that is the
1767 location of the repository. Example:</p>
1768 <pre class="literal-block">
1769 [paths]
1770 my_server = https://example.com/my_repo
1771 local_path = /home/me/repo
1772 </pre>
1773 <p>These symbolic names can be used from the command line. To pull
1774 from <tt class="docutils literal">my_server</tt>: <a class="reference external" href="hg-pull.html"><tt class="docutils literal">hg pull my_server</tt></a>. To push to <tt class="docutils literal">local_path</tt>:
1775 <a class="reference external" href="hg-push.html"><tt class="docutils literal">hg push local_path</tt></a>. You can check <a class="reference external" href="topic-urls.html"><tt class="docutils literal">hg help urls</tt></a> for details about
1776 valid URLs.</p>
1777 <p>Options containing colons (<tt class="docutils literal">:</tt>) denote sub-options that can influence
1778 behavior for that specific path. Example:</p>
1779 <pre class="literal-block">
1780 [paths]
1781 my_server = https://example.com/my_path
1782 my_server:pushurl = ssh://example.com/my_path
1783 </pre>
1784 <p>Paths using the <cite>path://otherpath</cite> scheme will inherit the sub-options value from
1785 the path they point to.</p>
1786 <p>The following sub-options can be defined:</p>
1787 <dl class="docutils">
1788 <dt><tt class="docutils literal"><span class="pre">multi-urls</span></tt></dt>
1789 <dd>A boolean option. When enabled the value of the <cite>[paths]</cite> entry will be
1790 parsed as a list and the alias will resolve to multiple destination. If some
1791 of the list entry use the <cite>path://</cite> syntax, the suboption will be inherited
1792 individually.</dd>
1793 <dt><tt class="docutils literal">pushurl</tt></dt>
1794 <dd>The URL to use for push operations. If not defined, the location
1795 defined by the path's main entry is used.</dd>
1796 <dt><tt class="docutils literal">pushrev</tt></dt>
1797 <dd><p class="first">A revset defining which revisions to push by default.</p>
1798 <p>When <a class="reference external" href="hg-push.html"><tt class="docutils literal">hg push</tt></a> is executed without a <tt class="docutils literal"><span class="pre">-r</span></tt> argument, the revset
1799 defined by this sub-option is evaluated to determine what to push.</p>
1800 <p>For example, a value of <tt class="docutils literal">.</tt> will push the working directory's
1801 revision by default.</p>
1802 <p class="last">Revsets specifying bookmarks will not result in the bookmark being
1803 pushed.</p>
1804 </dd>
1805 <dt><tt class="docutils literal">bookmarks.mode</tt></dt>
1806 <dd><p class="first">How bookmark will be dealt during the exchange. It support the following value</p>
1807 <ul class="last simple">
1808 <li><tt class="docutils literal">default</tt>: the default behavior, local and remote bookmarks are &quot;merged&quot;
1809 on push/pull.</li>
1810 <li><tt class="docutils literal">mirror</tt>: when pulling, replace local bookmarks by remote bookmarks. This
1811 is useful to replicate a repository, or as an optimization.</li>
1812 <li><tt class="docutils literal">ignore</tt>: ignore bookmarks during exchange.
1813 (This currently only affect pulling)</li>
1814 </ul>
1815 </dd>
1816 </dl>
1817 <div class="verbose docutils container">
1818 <p><tt class="docutils literal"><span class="pre">pulled-delta-reuse-policy</span></tt>
1819 Control the policy regarding deltas sent by the remote during pulls.</p>
1820 <p>This is an advanced option that non-admin users should not need to understand
1821 or set. This option can be used to speed up pulls from trusted central
1822 servers, or to fix-up deltas from older servers.</p>
1823 <p>It supports the following values:</p>
1824 <ul class="simple">
1825 <li><tt class="docutils literal">default</tt>: use the policy defined by
1826 <cite>storage.revlog.reuse-external-delta-parent</cite>,</li>
1827 <li><tt class="docutils literal"><span class="pre">no-reuse</span></tt>: start a new optimal delta search for each new revision we add
1828 to the repository. The deltas from the server will be reused when the base
1829 it applies to is tested (this can be frequent if that base is the one and
1830 unique parent of that revision). This can significantly slowdown pulls but
1831 will result in an optimized storage space if the remote peer is sending poor
1832 quality deltas.</li>
1833 <li><tt class="docutils literal"><span class="pre">try-base</span></tt>: try to reuse the deltas from the remote peer as long as they
1834 create a valid delta-chain in the local repository. This speeds up the
1835 unbundling process, but can result in sub-optimal storage space if the
1836 remote peer is sending poor quality deltas.</li>
1837 <li><tt class="docutils literal">forced</tt>: the deltas from the peer will be reused in all cases, even if
1838 the resulting delta-chain is &quot;invalid&quot;. This setting will ensure the bundle
1839 is applied at minimal CPU cost, but it can result in longer delta chains
1840 being created on the client, making revisions potentially slower to access
1841 in the future. If you think you need this option, you should make sure you
1842 are also talking to the Mercurial developer community to get confirmation.</li>
1843 </ul>
1844 <p>See <cite>hg help config.storage.revlog.reuse-external-delta-parent</cite> for a similar
1845 global option. That option defines the behavior of <cite>default</cite>.</p>
1846 </div>
1847 <p>The following special named paths exist:</p>
1848 <dl class="docutils">
1849 <dt><tt class="docutils literal">default</tt></dt>
1850 <dd><p class="first">The URL or directory to use when no source or remote is specified.</p>
1851 <p class="last"><a class="reference external" href="hg-clone.html"><tt class="docutils literal">hg clone</tt></a> will automatically define this path to the location the
1852 repository was cloned from.</p>
1853 </dd>
1854 <dt><tt class="docutils literal"><span class="pre">default-push</span></tt></dt>
1855 <dd>(deprecated) The URL or directory for the default <a class="reference external" href="hg-push.html"><tt class="docutils literal">hg push</tt></a> location.
1856 <tt class="docutils literal">default:pushurl</tt> should be used instead.</dd>
1857 </dl>
1858 </div>
1859 <div class="section" id="phases">
1860 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">phases</tt></a></h2>
1861 <p>Specifies default handling of phases. See <a class="reference external" href="topic-phases.html"><tt class="docutils literal">hg help phases</tt></a> for more
1862 information about working with phases.</p>
1863 <dl class="docutils">
1864 <dt><tt class="docutils literal">publish</tt></dt>
1865 <dd>Controls draft phase behavior when working as a server. When true,
1866 pushed changesets are set to public in both client and server and
1867 pulled or cloned changesets are set to public in the client.
1868 (default: True)</dd>
1869 <dt><tt class="docutils literal"><span class="pre">new-commit</span></tt></dt>
1870 <dd>Phase of newly-created commits.
1871 (default: draft)</dd>
1872 <dt><tt class="docutils literal">checksubrepos</tt></dt>
1873 <dd>Check the phase of the current revision of each subrepository. Allowed
1874 values are &quot;ignore&quot;, &quot;follow&quot; and &quot;abort&quot;. For settings other than
1875 &quot;ignore&quot;, the phase of the current revision of each subrepository is
1876 checked before committing the parent repository. If any of those phases is
1877 greater than the phase of the parent repository (e.g. if a subrepo is in a
1878 &quot;secret&quot; phase while the parent repo is in &quot;draft&quot; phase), the commit is
1879 either aborted (if checksubrepos is set to &quot;abort&quot;) or the higher phase is
1880 used for the parent repository commit (if set to &quot;follow&quot;).
1881 (default: follow)</dd>
1882 </dl>
1883 </div>
1884 <div class="section" id="profiling">
1885 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">profiling</tt></a></h2>
1886 <p>Specifies profiling type, format, and file output. Two profilers are
1887 supported: an instrumenting profiler (named <tt class="docutils literal">ls</tt>), and a sampling
1888 profiler (named <tt class="docutils literal">stat</tt>).</p>
1889 <p>In this section description, 'profiling data' stands for the raw data
1890 collected during profiling, while 'profiling report' stands for a
1891 statistical text report generated from the profiling data.</p>
1892 <dl class="docutils">
1893 <dt><tt class="docutils literal">enabled</tt></dt>
1894 <dd><p class="first">Enable the profiler.
1895 (default: false)</p>
1896 <p class="last">This is equivalent to passing <tt class="docutils literal"><span class="pre">--profile</span></tt> on the command line.</p>
1897 </dd>
1898 <dt><tt class="docutils literal">type</tt></dt>
1899 <dd><p class="first">The type of profiler to use.
1900 (default: stat)</p>
1901 <dl class="last docutils">
1902 <dt><tt class="docutils literal">ls</tt></dt>
1903 <dd>Use Python's built-in instrumenting profiler. This profiler
1904 works on all platforms, but each line number it reports is the
1905 first line of a function. This restriction makes it difficult to
1906 identify the expensive parts of a non-trivial function.</dd>
1907 <dt><tt class="docutils literal">stat</tt></dt>
1908 <dd>Use a statistical profiler, statprof. This profiler is most
1909 useful for profiling commands that run for longer than about 0.1
1910 seconds.</dd>
1911 <dt><tt class="docutils literal"><span class="pre">py-spy</span></tt></dt>
1912 <dd>use the py-spy profiler. A external py-spy executable must be available.
1913 (Make sure to check <cite>profiling.output</cite> config to write the result.)</dd>
1914 </dl>
1915 </dd>
1916 <dt><tt class="docutils literal">format</tt></dt>
1917 <dd><p class="first">Profiling format. Specific to the <tt class="docutils literal">ls</tt> instrumenting profiler.
1918 (default: text)</p>
1919 <dl class="last docutils">
1920 <dt><tt class="docutils literal">text</tt></dt>
1921 <dd>Generate a profiling report. When saving to a file, it should be
1922 noted that only the report is saved, and the profiling data is
1923 not kept.</dd>
1924 <dt><tt class="docutils literal">kcachegrind</tt></dt>
1925 <dd>Format profiling data for kcachegrind use: when saving to a
1926 file, the generated file can directly be loaded into
1927 kcachegrind.</dd>
1928 </dl>
1929 </dd>
1930 <dt><tt class="docutils literal">statformat</tt></dt>
1931 <dd><p class="first">Profiling format for the <tt class="docutils literal">stat</tt> profiler.
1932 (default: hotpath)</p>
1933 <dl class="last docutils">
1934 <dt><tt class="docutils literal">hotpath</tt></dt>
1935 <dd>Show a tree-based display containing the hot path of execution (where
1936 most time was spent).</dd>
1937 <dt><tt class="docutils literal">bymethod</tt></dt>
1938 <dd>Show a table of methods ordered by how frequently they are active.</dd>
1939 <dt><tt class="docutils literal">byline</tt></dt>
1940 <dd>Show a table of lines in files ordered by how frequently they are active.</dd>
1941 <dt><tt class="docutils literal">json</tt></dt>
1942 <dd>Render profiling data as JSON.</dd>
1943 </dl>
1944 </dd>
1945 <dt><tt class="docutils literal">freq</tt></dt>
1946 <dd>Sampling frequency. Specific to the <tt class="docutils literal">stat</tt> sampling profiler.
1947 (default: 1000)</dd>
1948 <dt><tt class="docutils literal">output</tt></dt>
1949 <dd>File path where profiling data or report should be saved. If the
1950 file exists, it is replaced. (default: None, data is printed on
1951 stderr)</dd>
1952 <dt><tt class="docutils literal"><span class="pre">output-dir</span></tt></dt>
1953 <dd>Directory in which profiling data or report should be saved. The data will be written to a file with the naming scheme &quot;hg-profile-{TIMESTAMP}-{PID}.prof&quot;. If both <tt class="docutils literal">output</tt> and <tt class="docutils literal"><span class="pre">output-dir</span></tt> are specified, <tt class="docutils literal">output</tt> will take precedence.</dd>
1954 <dt><tt class="docutils literal"><span class="pre">output-dir:create</span></tt></dt>
1955 <dd>Create output-dir if it doesn't already exist.</dd>
1956 <dt><tt class="docutils literal">sort</tt></dt>
1957 <dd>Sort field. Specific to the <tt class="docutils literal">ls</tt> instrumenting profiler.
1958 One of <tt class="docutils literal">callcount</tt>, <tt class="docutils literal">reccallcount</tt>, <tt class="docutils literal">totaltime</tt> and
1959 <tt class="docutils literal">inlinetime</tt>.
1960 (default: inlinetime)</dd>
1961 <dt><tt class="docutils literal"><span class="pre">time-track</span></tt></dt>
1962 <dd>Control if the stat profiler track <tt class="docutils literal">cpu</tt> or <tt class="docutils literal">real</tt> time.
1963 (default: <tt class="docutils literal">cpu</tt> on Windows, otherwise <tt class="docutils literal">real</tt>)</dd>
1964 <dt><tt class="docutils literal">limit</tt></dt>
1965 <dd>Number of lines to show. Specific to the <tt class="docutils literal">ls</tt> instrumenting profiler.
1966 (default: 30)</dd>
1967 <dt><tt class="docutils literal">nested</tt></dt>
1968 <dd>Show at most this number of lines of drill-down info after each main entry.
1969 This can help explain the difference between Total and Inline.
1970 Specific to the <tt class="docutils literal">ls</tt> instrumenting profiler.
1971 (default: 0)</dd>
1972 <dt><tt class="docutils literal">showmin</tt></dt>
1973 <dd><p class="first">Minimum fraction of samples an entry must have for it to be displayed.
1974 Can be specified as a float between <tt class="docutils literal">0.0</tt> and <tt class="docutils literal">1.0</tt> or can have a
1975 <tt class="docutils literal">%</tt> afterwards to allow values up to <tt class="docutils literal">100</tt>. e.g. <tt class="docutils literal">5%</tt>.</p>
1976 <p>Only used by the <tt class="docutils literal">stat</tt> profiler.</p>
1977 <p>For the <tt class="docutils literal">hotpath</tt> format, default is <tt class="docutils literal">0.05</tt>.
1978 For the <tt class="docutils literal">chrome</tt> format, default is <tt class="docutils literal">0.005</tt>.</p>
1979 <p class="last">The option is unused on other formats.</p>
1980 </dd>
1981 <dt><tt class="docutils literal">showmax</tt></dt>
1982 <dd><p class="first">Maximum fraction of samples an entry can have before it is ignored in
1983 display. Values format is the same as <tt class="docutils literal">showmin</tt>.</p>
1984 <p>Only used by the <tt class="docutils literal">stat</tt> profiler.</p>
1985 <p>For the <tt class="docutils literal">chrome</tt> format, default is <tt class="docutils literal">0.999</tt>.</p>
1986 <p class="last">The option is unused on other formats.</p>
1987 </dd>
1988 <dt><tt class="docutils literal">showtime</tt></dt>
1989 <dd>Show time taken as absolute durations, in addition to percentages.
1990 Only used by the <tt class="docutils literal">hotpath</tt> format.
1991 (default: true)</dd>
1992 </dl>
1993 </div>
1994 <div class="section" id="progress">
1995 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">progress</tt></a></h2>
1996 <p>Mercurial commands can draw progress bars that are as informative as
1997 possible. Some progress bars only offer indeterminate information, while others
1998 have a definite end point.</p>
1999 <dl class="docutils">
2000 <dt><tt class="docutils literal">debug</tt></dt>
2001 <dd>Whether to print debug info when updating the progress bar. (default: False)</dd>
2002 <dt><tt class="docutils literal">delay</tt></dt>
2003 <dd>Number of seconds (float) before showing the progress bar. (default: 3)</dd>
2004 <dt><tt class="docutils literal">changedelay</tt></dt>
2005 <dd>Minimum delay before showing a new topic. When set to less than 3 * refresh,
2006 that value will be used instead. (default: 1)</dd>
2007 <dt><tt class="docutils literal">estimateinterval</tt></dt>
2008 <dd>Maximum sampling interval in seconds for speed and estimated time
2009 calculation. (default: 60)</dd>
2010 <dt><tt class="docutils literal">refresh</tt></dt>
2011 <dd>Time in seconds between refreshes of the progress bar. (default: 0.1)</dd>
2012 <dt><tt class="docutils literal">format</tt></dt>
2013 <dd><p class="first">Format of the progress bar.</p>
2014 <p>Valid entries for the format field are <tt class="docutils literal">topic</tt>, <tt class="docutils literal">bar</tt>, <tt class="docutils literal">number</tt>,
2015 <tt class="docutils literal">unit</tt>, <tt class="docutils literal">estimate</tt>, <tt class="docutils literal">speed</tt>, and <tt class="docutils literal">item</tt>. <tt class="docutils literal">item</tt> defaults to the
2016 last 20 characters of the item, but this can be changed by adding either
2017 <tt class="docutils literal"><span class="pre">-&lt;num&gt;</span></tt> which would take the last num characters, or <tt class="docutils literal">+&lt;num&gt;</tt> for the
2018 first num characters.</p>
2019 <p class="last">(default: topic bar number estimate)</p>
2020 </dd>
2021 <dt><tt class="docutils literal">width</tt></dt>
2022 <dd>If set, the maximum width of the progress information (that is, min(width,
2023 term width) will be used).</dd>
2024 <dt><tt class="docutils literal"><span class="pre">clear-complete</span></tt></dt>
2025 <dd>Clear the progress bar after it's done. (default: True)</dd>
2026 <dt><tt class="docutils literal">disable</tt></dt>
2027 <dd>If true, don't show a progress bar.</dd>
2028 <dt><tt class="docutils literal"><span class="pre">assume-tty</span></tt></dt>
2029 <dd>If true, ALWAYS show a progress bar, unless disable is given.</dd>
2030 </dl>
2031 </div>
2032 <div class="section" id="rebase">
2033 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">rebase</tt></a></h2>
2034 <dl class="docutils">
2035 <dt><tt class="docutils literal">evolution.allowdivergence</tt></dt>
2036 <dd>Default to False, when True allow creating divergence when performing
2037 rebase of obsolete changesets.</dd>
2038 </dl>
2039 </div>
2040 <div class="section" id="revsetalias">
2041 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">revsetalias</tt></a></h2>
2042 <p>Alias definitions for revsets. See <a class="reference external" href="hg.1.html#revsets"><tt class="docutils literal">hg help revsets</tt></a> for details.</p>
2043 </div>
2044 <div class="section" id="rewrite">
2045 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">rewrite</tt></a></h2>
2046 <dl class="docutils">
2047 <dt><tt class="docutils literal"><span class="pre">backup-bundle</span></tt></dt>
2048 <dd>Whether to save stripped changesets to a bundle file. (default: True)</dd>
2049 <dt><tt class="docutils literal"><span class="pre">update-timestamp</span></tt></dt>
2050 <dd>If true, updates the date and time of the changeset to current. It is only
2051 applicable for <cite>hg amend</cite>, <cite>hg commit --amend</cite> and <cite>hg uncommit</cite> in the
2052 current version.</dd>
2053 </dl>
2054 <p><tt class="docutils literal"><span class="pre">empty-successor</span></tt></p>
2055 <blockquote>
2056 <p>Control what happens with empty successors that are the result of rewrite
2057 operations. If set to <tt class="docutils literal">skip</tt>, the successor is not created. If set to
2058 <tt class="docutils literal">keep</tt>, the empty successor is created and kept.</p>
2059 <p>Currently, only the rebase and absorb commands consider this configuration.
2060 (EXPERIMENTAL)</p>
2061 </blockquote>
2062 </div>
2063 <div class="section" id="rhg">
2064 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">rhg</tt></a></h2>
2065 <p>The pure Rust fast-path for Mercurial. See <cite>rust/README.md</cite> in the Mercurial repository.</p>
2066 <dl class="docutils">
2067 <dt><tt class="docutils literal"><span class="pre">fallback-executable</span></tt></dt>
2068 <dd>Path to the executable to run in a sub-process when falling back to
2069 another implementation of Mercurial.</dd>
2070 <dt><tt class="docutils literal"><span class="pre">fallback-immediately</span></tt></dt>
2071 <dd><p class="first">Fall back to <tt class="docutils literal"><span class="pre">fallback-executable</span></tt> as soon as possible, regardless of
2072 the <cite>rhg.on-unsupported</cite> configuration. Useful for debugging, for example to
2073 bypass <cite>rhg</cite> if the deault <cite>hg</cite> points to <cite>rhg</cite>.</p>
2074 <p class="last">Note that because this requires loading the configuration, it is possible
2075 that <cite>rhg</cite> error out before being able to fall back.</p>
2076 </dd>
2077 <dt><tt class="docutils literal"><span class="pre">ignored-extensions</span></tt></dt>
2078 <dd><p class="first">Controls which extensions should be ignored by <cite>rhg</cite>. By default, <cite>rhg</cite>
2079 triggers the <cite>rhg.on-unsupported</cite> behavior any unsupported extensions.
2080 Users can disable that behavior when they know that a given extension
2081 does not need support from <cite>rhg</cite>.</p>
2082 <p>Expects a list of extension names, or <tt class="docutils literal">*</tt> to ignore all extensions.</p>
2083 <p class="last">Note: <tt class="docutils literal"><span class="pre">*:&lt;suboption&gt;</span></tt> is also a valid extension name for this
2084 configuration option.
2085 As of this writing, the only valid &quot;global&quot; suboption is <tt class="docutils literal">required</tt>.</p>
2086 </dd>
2087 <dt><tt class="docutils literal"><span class="pre">on-unsupported</span></tt></dt>
2088 <dd><p class="first">Controls the behavior of <cite>rhg</cite> when detecting unsupported features.</p>
2089 <p>Possible values are <cite>abort</cite> (default), <cite>abort-silent</cite> and <cite>fallback</cite>.</p>
2090 <dl class="last docutils">
2091 <dt><tt class="docutils literal">abort</tt></dt>
2092 <dd>Print an error message describing what feature is not supported,
2093 and exit with code 252</dd>
2094 <dt><tt class="docutils literal"><span class="pre">abort-silent</span></tt></dt>
2095 <dd>Silently exit with code 252</dd>
2096 <dt><tt class="docutils literal">fallback</tt></dt>
2097 <dd>Try running the fallback executable with the same parameters
2098 (and trace the fallback reason, use <cite>RUST_LOG=trace</cite> to see).</dd>
2099 </dl>
2100 </dd>
2101 </dl>
2102 </div>
2103 <div class="section" id="share">
2104 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">share</tt></a></h2>
2105 <dl class="docutils">
2106 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-safe</span></tt></dt>
2107 <dd><p class="first">Controls what happens when the shared repository does not use the
2108 share-safe mechanism but its source repository does.</p>
2109 <p>Possible values are <cite>abort</cite> (default), <cite>allow</cite>, <cite>upgrade-abort</cite> and
2110 <cite>upgrade-allow</cite>.</p>
2111 <dl class="docutils">
2112 <dt><tt class="docutils literal">abort</tt></dt>
2113 <dd>Disallows running any command and aborts</dd>
2114 <dt><tt class="docutils literal">allow</tt></dt>
2115 <dd>Respects the feature presence in the share source</dd>
2116 <dt><tt class="docutils literal"><span class="pre">upgrade-abort</span></tt></dt>
2117 <dd>Tries to upgrade the share to use share-safe; if it fails, aborts</dd>
2118 <dt><tt class="docutils literal"><span class="pre">upgrade-allow</span></tt></dt>
2119 <dd>Tries to upgrade the share; if it fails, continue by
2120 respecting the share source setting</dd>
2121 </dl>
2122 <p class="last">Check <a class="reference external" href="hgrc.5.html#format"><tt class="docutils literal">hg help <span class="pre">config.format.use-share-safe</span></tt></a> for details about the
2123 share-safe feature.</p>
2124 </dd>
2125 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-safe:verbose-upgrade</span></tt></dt>
2126 <dd>Display a message when upgrading, (default: True)</dd>
2127 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-safe.warn</span></tt></dt>
2128 <dd>Shows a warning on operations if the shared repository does not use
2129 share-safe, but the source repository does.
2130 (default: True)</dd>
2131 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-not-safe</span></tt></dt>
2132 <dd><p class="first">Controls what happens when the shared repository uses the share-safe
2133 mechanism but its source does not.</p>
2134 <p>Possible values are <cite>abort</cite> (default), <cite>allow</cite>, <cite>downgrade-abort</cite> and
2135 <cite>downgrade-allow</cite>.</p>
2136 <dl class="docutils">
2137 <dt><tt class="docutils literal">abort</tt></dt>
2138 <dd>Disallows running any command and aborts</dd>
2139 <dt><tt class="docutils literal">allow</tt></dt>
2140 <dd>Respects the feature presence in the share source</dd>
2141 <dt><tt class="docutils literal"><span class="pre">downgrade-abort</span></tt></dt>
2142 <dd>Tries to downgrade the share to not use share-safe; if it fails, aborts</dd>
2143 <dt><tt class="docutils literal"><span class="pre">downgrade-allow</span></tt></dt>
2144 <dd>Tries to downgrade the share to not use share-safe;
2145 if it fails, continue by respecting the shared source setting</dd>
2146 </dl>
2147 <p class="last">Check <a class="reference external" href="hgrc.5.html#format"><tt class="docutils literal">hg help <span class="pre">config.format.use-share-safe</span></tt></a> for details about the
2148 share-safe feature.</p>
2149 </dd>
2150 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-not-safe:verbose-upgrade</span></tt></dt>
2151 <dd>Display a message when upgrading, (default: True)</dd>
2152 <dt><tt class="docutils literal"><span class="pre">safe-mismatch.source-not-safe.warn</span></tt></dt>
2153 <dd>Shows a warning on operations if the shared repository uses share-safe,
2154 but the source repository does not.
2155 (default: True)</dd>
2156 </dl>
2157 </div>
2158 <div class="section" id="storage">
2159 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">storage</tt></a></h2>
2160 <p>Control the strategy Mercurial uses internally to store history. Options in this
2161 category impact performance and repository size.</p>
2162 <dl class="docutils">
2163 <dt><tt class="docutils literal"><span class="pre">all-slow-path</span></tt></dt>
2164 <dd><p class="first">Control the behavior of Mercurial when lacking performant code</p>
2165 <p>Some format features might only have a fast implementation when a specific
2166 flavor is installed (e.g. when the Rust extensions are available). A slow pure
2167 Python implementation might be available to help with converting the repository
2168 to another format or to perform a few accesses in an automation context.
2169 Using such accesses might result in Mercurial becoming multiple time slower
2170 than usual.</p>
2171 <p>Acceptable values:</p>
2172 <p><tt class="docutils literal">allow</tt>: Silently use the slower implementation to access the repository.
2173 <tt class="docutils literal">warn</tt>: Warn, but use the slower implementation to access the repository.
2174 <tt class="docutils literal">abort</tt>: Prevent access to such repositories. (This is the default)</p>
2175 <p class="last">See the individual &quot;storage.*.slow-path&quot; configs for details. These options can
2176 override the default.</p>
2177 </dd>
2178 <dt><tt class="docutils literal"><span class="pre">revlog.dirstate-v2.slow-path</span></tt></dt>
2179 <dd><p class="first">Control the behavior of Mercurial when using a repository with the &quot;dirstate-v2&quot;
2180 feature with an installation of Mercurial without a fast implementation for
2181 the feature:</p>
2182 <p><tt class="docutils literal">allow</tt>: Silently use the slower implementation to access the repository.
2183 <tt class="docutils literal">warn</tt>: Warn, but use the slower implementation to access the repository.
2184 <tt class="docutils literal">default</tt>: use value from the <cite>storage.all-slow-path</cite> value.
2185 <tt class="docutils literal">abort</tt>: Prevent access to such repositories. (This is the default)</p>
2186 <p class="last">For details on the &quot;dirstate-v2&quot; feature, see:
2187 <a class="reference external" href="hgrc.5.html#format"><tt class="docutils literal">hg help <span class="pre">config.format.use-dirstate-v2</span></tt></a>.</p>
2188 </dd>
2189 <dt><tt class="docutils literal"><span class="pre">revlog.exchange-compressed-delta</span></tt></dt>
2190 <dd><p class="first">Controls whether the repository might emit or request
2191 compressed deltas in bundles.</p>
2192 <p>Exchanging deltas in their compressed form results in larger bundles and higher
2193 bandwidth usage, but reduces CPU usage on both ends and helps the main server
2194 to use agressive compression levels to share that benefit with ordinary clients
2195 pulling from them.</p>
2196 <p class="last">Even when activated, the exchange of compressed deltas will only be used if the
2197 exchange uses a changegroup format that supports it (04 and above) and the
2198 receiving end supports it.</p>
2199 </dd>
2200 <dt><tt class="docutils literal"><span class="pre">revlog.issue6528.fix-incoming</span></tt></dt>
2201 <dd><p class="first">Version 5.8 of Mercurial had a bug leading to altering the parent of file
2202 revision with copy information (or any other metadata) on exchange. This
2203 leads to the copy metadata to be overlooked by various internal logic. The
2204 issue was fixed in Mercurial 5.8.1.
2205 (See <a class="reference external" href="https://bz.mercurial-scm.org/show_bug.cgi?id=6528">https://bz.mercurial-scm.org/show_bug.cgi?id=6528</a> for details)</p>
2206 <p>As a result Mercurial is now checking and fixing incoming file revisions to
2207 make sure there parents are in the right order. This behavior can be
2208 disabled by setting this option to <cite>no</cite>. This apply to revisions added
2209 through push, pull, clone and unbundle.</p>
2210 <p class="last">To fix affected revisions that already exist within the repository, one can
2211 use <a class="reference external" href="hg-debug-repair-issue-6528.html"><tt class="docutils literal">hg <span class="pre">debug-repair-issue-6528</span></tt></a>.</p>
2212 </dd>
2213 </dl>
2214 <div class="verbose docutils container">
2215 <dl class="docutils">
2216 <dt><tt class="docutils literal"><span class="pre">revlog.delta-parent-search.candidate-group-chunk-size</span></tt></dt>
2217 <dd><p class="first">Tune the number of delta bases the storage will consider in the
2218 same &quot;round&quot; of search. In some very rare cases, using a smaller value
2219 might result in faster processing at the possible expense of storage
2220 space, while using larger values might result in slower processing at the
2221 possible benefit of storage space. A value of &quot;0&quot; means no limitation.</p>
2222 <p>default: no limitation</p>
2223 <p class="last">This is unlikely that you'll have to tune this configuration. If you think
2224 you do, consider talking with the mercurial developer community about your
2225 repositories.</p>
2226 </dd>
2227 </dl>
2228 </div>
2229 <dl class="docutils">
2230 <dt><tt class="docutils literal">revlog.mmap.index</tt></dt>
2231 <dd>Whether to use the Operating System &quot;memory mapping&quot; feature (when
2232 possible) to access the revlog index. This improves performance
2233 and reduces memory pressure.</dd>
2234 </dl>
2235 <div class="verbose docutils container">
2236 <p><tt class="docutils literal"><span class="pre">revlog.mmap.index:size-threshold</span></tt></p>
2237 <blockquote>
2238 The size of index above which to use the &quot;memory mapping&quot; feature.</blockquote>
2239 </div>
2240 <dl class="docutils">
2241 <dt><tt class="docutils literal"><span class="pre">revlog.optimize-delta-parent-choice</span></tt></dt>
2242 <dd><p class="first">When storing a merge revision, both parents will be equally considered as
2243 a possible delta base. This results in better delta selection and improved
2244 revlog compression. This option is enabled by default.</p>
2245 <p class="last">Turning this option off can result in large increase of repository size for
2246 repository with many merges.</p>
2247 </dd>
2248 <dt><tt class="docutils literal"><span class="pre">revlog.persistent-nodemap.mmap</span></tt></dt>
2249 <dd><p class="first">Whether to use the Operating System &quot;memory mapping&quot; feature (when
2250 possible) to access the persistent nodemap data. This improve performance
2251 and reduce memory pressure.</p>
2252 <p>Default to True.</p>
2253 <p class="last">For details on the &quot;persistent-nodemap&quot; feature, see:
2254 <a class="reference external" href="hgrc.5.html#format"><tt class="docutils literal">hg help <span class="pre">config.format.use-persistent-nodemap</span></tt></a>.</p>
2255 </dd>
2256 <dt><tt class="docutils literal"><span class="pre">revlog.persistent-nodemap.slow-path</span></tt></dt>
2257 <dd><p class="first">Control the behavior of Mercurial when using a repository with a &quot;persistent&quot;
2258 nodemap with an installation of Mercurial without a fast implementation for
2259 the feature:</p>
2260 <p><tt class="docutils literal">allow</tt>: Silently use the slower implementation to access the repository.
2261 <tt class="docutils literal">warn</tt>: Warn, but use the slower implementation to access the repository.
2262 <tt class="docutils literal">default</tt>: use the value from the <cite>storage.all-slow-path</cite> value.
2263 <tt class="docutils literal">abort</tt>: Prevent access to such repositories. (This is the default)</p>
2264 <p class="last">For details on the &quot;persistent-nodemap&quot; feature, see:
2265 <a class="reference external" href="hgrc.5.html#format"><tt class="docutils literal">hg help <span class="pre">config.format.use-persistent-nodemap</span></tt></a>.</p>
2266 </dd>
2267 <dt><tt class="docutils literal"><span class="pre">revlog.reuse-external-delta-parent</span></tt></dt>
2268 <dd><p class="first">Control the order in which delta parents are considered when adding new
2269 revisions from an external source.
2270 (typically: apply bundle from <cite>hg pull</cite> or <cite>hg push</cite>).</p>
2271 <p>New revisions are usually provided as a delta against other revisions. By
2272 default, Mercurial will try to reuse this delta first, therefore using the
2273 same &quot;delta parent&quot; as the source. Directly using delta's from the source
2274 reduces CPU usage and usually speeds up operation. However, in some case,
2275 the source might have sub-optimal delta bases and forcing their reevaluation
2276 is useful. For example, pushes from an old client could have sub-optimal
2277 delta's parent that the server want to optimize. (lack of general delta, bad
2278 parents, choice, lack of sparse-revlog, etc).</p>
2279 <p>This option is enabled by default. Turning it off will ensure bad delta
2280 parent choices from older client do not propagate to this repository, at
2281 the cost of a small increase in CPU consumption.</p>
2282 <p class="last">Note: this option only control the order in which delta parents are
2283 considered. Even when disabled, the existing delta from the source will be
2284 reused if the same delta parent is selected.</p>
2285 </dd>
2286 <dt><tt class="docutils literal"><span class="pre">revlog.reuse-external-delta</span></tt></dt>
2287 <dd><p class="first">Control the reuse of delta from external source.
2288 (typically: apply bundle from <cite>hg pull</cite> or <cite>hg push</cite>).</p>
2289 <p>New revisions are usually provided as a delta against another revision. By
2290 default, Mercurial will not recompute the same delta again, trusting
2291 externally provided deltas. There have been rare cases of small adjustment
2292 to the diffing algorithm in the past. So in some rare case, recomputing
2293 delta provided by ancient clients can provides better results. Disabling
2294 this option means going through a full delta recomputation for all incoming
2295 revisions. It means a large increase in CPU usage and will slow operations
2296 down.</p>
2297 <p class="last">This option is enabled by default. When disabled, it also disables the
2298 related <tt class="docutils literal"><span class="pre">storage.revlog.reuse-external-delta-parent</span></tt> option.</p>
2299 </dd>
2300 <dt><tt class="docutils literal"><span class="pre">revlog.reuse-external-delta-compression</span></tt></dt>
2301 <dd>When true, reuse the compression of incoming deltas
2302 when receiving a compressed delta if its compression type is compatible
2303 with the one used by the revlog.</dd>
2304 <dt><tt class="docutils literal">revlog.zlib.level</tt></dt>
2305 <dd>Zlib compression level used when storing data into the repository. Accepted
2306 Value range from 1 (lowest compression) to 9 (highest compression). Zlib
2307 default value is 6.</dd>
2308 <dt><tt class="docutils literal">revlog.zstd.level</tt></dt>
2309 <dd>zstd compression level used when storing data into the repository. Accepted
2310 Value range from 1 (lowest compression) to 22 (highest compression).
2311 (default 3)</dd>
2312 </dl>
2313 </div>
2314 <div class="section" id="server">
2315 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">server</tt></a></h2>
2316 <p>Controls generic server settings.</p>
2317 <dl class="docutils">
2318 <dt><tt class="docutils literal"><span class="pre">bookmarks-pushkey-compat</span></tt></dt>
2319 <dd><p class="first">Trigger pushkey hook when being pushed bookmark updates. This config exist
2320 for compatibility purpose (default to True)</p>
2321 <p class="last">If you use <tt class="docutils literal">pushkey</tt> and <tt class="docutils literal"><span class="pre">pre-pushkey</span></tt> hooks to control bookmark
2322 movement we recommend you migrate them to <tt class="docutils literal"><span class="pre">txnclose-bookmark</span></tt> and
2323 <tt class="docutils literal"><span class="pre">pretxnclose-bookmark</span></tt>.</p>
2324 </dd>
2325 <dt><tt class="docutils literal">compressionengines</tt></dt>
2326 <dd><p class="first">List of compression engines and their relative priority to advertise
2327 to clients.</p>
2328 <p>The order of compression engines determines their priority, the first
2329 having the highest priority. If a compression engine is not listed
2330 here, it won't be advertised to clients.</p>
2331 <p>If not set (the default), built-in defaults are used. Run
2332 <a class="reference external" href="hg-debuginstall.html"><tt class="docutils literal">hg debuginstall</tt></a> to list available compression engines and their
2333 default wire protocol priority.</p>
2334 <p class="last">Older Mercurial clients only support zlib compression and this setting
2335 has no effect for legacy clients.</p>
2336 </dd>
2337 <dt><tt class="docutils literal">uncompressed</tt></dt>
2338 <dd>Whether to allow clients to clone a repository using the
2339 uncompressed streaming protocol. This transfers about 40% more
2340 data than a regular clone, but uses less memory and CPU on both
2341 server and client. Over a LAN (100 Mbps or better) or a very fast
2342 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
2343 regular clone. Over most WAN connections (anything slower than
2344 about 6 Mbps), uncompressed streaming is slower, because of the
2345 extra data transfer overhead. This mode will also temporarily hold
2346 the write lock while determining what data to transfer.
2347 (default: True)</dd>
2348 <dt><tt class="docutils literal">uncompressedallowsecret</tt></dt>
2349 <dd>Whether to allow stream clones when the repository contains secret
2350 changesets. (default: False)</dd>
2351 <dt><tt class="docutils literal">preferuncompressed</tt></dt>
2352 <dd>When set, clients will try to use the uncompressed streaming
2353 protocol. (default: False)</dd>
2354 <dt><tt class="docutils literal">disablefullbundle</tt></dt>
2355 <dd>When set, servers will refuse attempts to do pull-based clones.
2356 If this option is set, <tt class="docutils literal">preferuncompressed</tt> and/or clone bundles
2357 are highly recommended. Partial clones will still be allowed.
2358 (default: False)</dd>
2359 <dt><tt class="docutils literal">streamunbundle</tt></dt>
2360 <dd>When set, servers will apply data sent from the client directly,
2361 otherwise it will be written to a temporary file first. This option
2362 effectively prevents concurrent pushes.</dd>
2363 <dt><tt class="docutils literal">pullbundle</tt></dt>
2364 <dd><p class="first">When set, the server will check pullbundles.manifest for bundles
2365 covering the requested heads and common nodes. The first matching
2366 entry will be streamed to the client.</p>
2367 <p class="last">For HTTP transport, the stream will still use zlib compression
2368 for older clients.</p>
2369 </dd>
2370 <dt><tt class="docutils literal"><span class="pre">concurrent-push-mode</span></tt></dt>
2371 <dd><p class="first">Level of allowed race condition between two pushing clients.</p>
2372 <ul class="simple">
2373 <li>'strict': push is abort if another client touched the repository
2374 while the push was preparing.</li>
2375 <li>'check-related': push is only aborted if it affects head that got also
2376 affected while the push was preparing. (default since 5.4)</li>
2377 </ul>
2378 <p class="last">'check-related' only takes effect for compatible clients (version
2379 4.3 and later). Older clients will use 'strict'.</p>
2380 </dd>
2381 <dt><tt class="docutils literal">validate</tt></dt>
2382 <dd>Whether to validate the completeness of pushed changesets by
2383 checking that all new file revisions specified in manifests are
2384 present. (default: False)</dd>
2385 <dt><tt class="docutils literal">maxhttpheaderlen</tt></dt>
2386 <dd>Instruct HTTP clients not to send request headers longer than this
2387 many bytes. (default: 1024)</dd>
2388 <dt><tt class="docutils literal">bundle1</tt></dt>
2389 <dd>Whether to allow clients to push and pull using the legacy bundle1
2390 exchange format. (default: True)</dd>
2391 <dt><tt class="docutils literal">bundle1gd</tt></dt>
2392 <dd>Like <tt class="docutils literal">bundle1</tt> but only used if the repository is using the
2393 <em>generaldelta</em> storage format. (default: True)</dd>
2394 <dt><tt class="docutils literal">bundle1.push</tt></dt>
2395 <dd>Whether to allow clients to push using the legacy bundle1 exchange
2396 format. (default: True)</dd>
2397 <dt><tt class="docutils literal">bundle1gd.push</tt></dt>
2398 <dd>Like <tt class="docutils literal">bundle1.push</tt> but only used if the repository is using the
2399 <em>generaldelta</em> storage format. (default: True)</dd>
2400 <dt><tt class="docutils literal">bundle1.pull</tt></dt>
2401 <dd>Whether to allow clients to pull using the legacy bundle1 exchange
2402 format. (default: True)</dd>
2403 <dt><tt class="docutils literal">bundle1gd.pull</tt></dt>
2404 <dd><p class="first">Like <tt class="docutils literal">bundle1.pull</tt> but only used if the repository is using the
2405 <em>generaldelta</em> storage format. (default: True)</p>
2406 <p class="last">Large repositories using the <em>generaldelta</em> storage format should
2407 consider setting this option because converting <em>generaldelta</em>
2408 repositories to the exchange format required by the bundle1 data
2409 format can consume a lot of CPU.</p>
2410 </dd>
2411 <dt><tt class="docutils literal">bundle2.stream</tt></dt>
2412 <dd>Whether to allow clients to pull using the bundle2 streaming protocol.
2413 (default: True)</dd>
2414 <dt><tt class="docutils literal">zliblevel</tt></dt>
2415 <dd><p class="first">Integer between <tt class="docutils literal"><span class="pre">-1</span></tt> and <tt class="docutils literal">9</tt> that controls the zlib compression level
2416 for wire protocol commands that send zlib compressed output (notably the
2417 commands that send repository history data).</p>
2418 <p>The default (<tt class="docutils literal"><span class="pre">-1</span></tt>) uses the default zlib compression level, which is
2419 likely equivalent to <tt class="docutils literal">6</tt>. <tt class="docutils literal">0</tt> means no compression. <tt class="docutils literal">9</tt> means
2420 maximum compression.</p>
2421 <p>Setting this option allows server operators to make trade-offs between
2422 bandwidth and CPU used. Lowering the compression lowers CPU utilization
2423 but sends more bytes to clients.</p>
2424 <p class="last">This option only impacts the HTTP server.</p>
2425 </dd>
2426 <dt><tt class="docutils literal">zstdlevel</tt></dt>
2427 <dd><p class="first">Integer between <tt class="docutils literal">1</tt> and <tt class="docutils literal">22</tt> that controls the zstd compression level
2428 for wire protocol commands. <tt class="docutils literal">1</tt> is the minimal amount of compression and
2429 <tt class="docutils literal">22</tt> is the highest amount of compression.</p>
2430 <p>The default (<tt class="docutils literal">3</tt>) should be significantly faster than zlib while likely
2431 delivering better compression ratios.</p>
2432 <p>This option only impacts the HTTP server.</p>
2433 <p class="last">See also <tt class="docutils literal">server.zliblevel</tt>.</p>
2434 </dd>
2435 <dt><tt class="docutils literal">view</tt></dt>
2436 <dd><p class="first">Repository filter used when exchanging revisions with the peer.</p>
2437 <p class="last">The default view (<tt class="docutils literal">served</tt>) excludes secret and hidden changesets.
2438 Another useful value is <tt class="docutils literal">immutable</tt> (no draft, secret or hidden
2439 changesets). (EXPERIMENTAL)</p>
2440 </dd>
2441 </dl>
2442 </div>
2443 <div class="section" id="smtp">
2444 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">smtp</tt></a></h2>
2445 <p>Configuration for extensions that need to send email messages.</p>
2446 <dl class="docutils">
2447 <dt><tt class="docutils literal">host</tt></dt>
2448 <dd>Host name of mail server, e.g. &quot;mail.example.com&quot;.</dd>
2449 <dt><tt class="docutils literal">port</tt></dt>
2450 <dd>Optional. Port to connect to on mail server. (default: 465 if
2451 <tt class="docutils literal">tls</tt> is smtps; 25 otherwise)</dd>
2452 <dt><tt class="docutils literal">tls</tt></dt>
2453 <dd>Optional. Method to enable TLS when connecting to mail server: starttls,
2454 smtps or none. (default: none)</dd>
2455 <dt><tt class="docutils literal">username</tt></dt>
2456 <dd>Optional. User name for authenticating with the SMTP server.
2457 (default: None)</dd>
2458 <dt><tt class="docutils literal">password</tt></dt>
2459 <dd>Optional. Password for authenticating with the SMTP server. If not
2460 specified, interactive sessions will prompt the user for a
2461 password; non-interactive sessions will fail. (default: None)</dd>
2462 <dt><tt class="docutils literal">local_hostname</tt></dt>
2463 <dd>Optional. The hostname that the sender can use to identify
2464 itself to the MTA.</dd>
2465 </dl>
2466 </div>
2467 <div class="section" id="subpaths">
2468 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">subpaths</tt></a></h2>
2469 <p>Subrepository source URLs can go stale if a remote server changes name
2470 or becomes temporarily unavailable. This section lets you define
2471 rewrite rules of the form:</p>
2472 <pre class="literal-block">
2473 &lt;pattern&gt; = &lt;replacement&gt;
2474 </pre>
2475 <p>where <tt class="docutils literal">pattern</tt> is a regular expression matching a subrepository
2476 source URL and <tt class="docutils literal">replacement</tt> is the replacement string used to
2477 rewrite it. Groups can be matched in <tt class="docutils literal">pattern</tt> and referenced in
2478 <tt class="docutils literal">replacements</tt>. For instance:</p>
2479 <pre class="literal-block">
2480 http://server/(.*)-hg/ = http://hg.server/\1/
2481 </pre>
2482 <p>rewrites <tt class="docutils literal"><span class="pre">http://server/foo-hg/</span></tt> into <tt class="docutils literal"><span class="pre">http://hg.server/foo/</span></tt>.</p>
2483 <p>Relative subrepository paths are first made absolute, and the
2484 rewrite rules are then applied on the full (absolute) path. If <tt class="docutils literal">pattern</tt>
2485 doesn't match the full path, an attempt is made to apply it on the
2486 relative path alone. The rules are applied in definition order.</p>
2487 </div>
2488 <div class="section" id="subrepos">
2489 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">subrepos</tt></a></h2>
2490 <p>This section contains options that control the behavior of the
2491 subrepositories feature. See also <a class="reference external" href="topic-subrepos.html"><tt class="docutils literal">hg help subrepos</tt></a>.</p>
2492 <p>Security note: auditing in Mercurial is known to be insufficient to
2493 prevent clone-time code execution with carefully constructed Git
2494 subrepos. It is unknown if a similar detect is present in Subversion
2495 subrepos. Both Git and Subversion subrepos are disabled by default
2496 out of security concerns. These subrepo types can be enabled using
2497 the respective options below.</p>
2498 <dl class="docutils">
2499 <dt><tt class="docutils literal">allowed</tt></dt>
2500 <dd><p class="first">Whether subrepositories are allowed in the working directory.</p>
2501 <p class="last">When false, commands involving subrepositories (like <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update</tt></a>)
2502 will fail for all subrepository types.
2503 (default: true)</p>
2504 </dd>
2505 <dt><tt class="docutils literal">hg:allowed</tt></dt>
2506 <dd>Whether Mercurial subrepositories are allowed in the working
2507 directory. This option only has an effect if <tt class="docutils literal">subrepos.allowed</tt>
2508 is true.
2509 (default: true)</dd>
2510 <dt><tt class="docutils literal">git:allowed</tt></dt>
2511 <dd><p class="first">Whether Git subrepositories are allowed in the working directory.
2512 This option only has an effect if <tt class="docutils literal">subrepos.allowed</tt> is true.</p>
2513 <p class="last">See the security note above before enabling Git subrepos.
2514 (default: false)</p>
2515 </dd>
2516 <dt><tt class="docutils literal">svn:allowed</tt></dt>
2517 <dd><p class="first">Whether Subversion subrepositories are allowed in the working
2518 directory. This option only has an effect if <tt class="docutils literal">subrepos.allowed</tt>
2519 is true.</p>
2520 <p class="last">See the security note above before enabling Subversion subrepos.
2521 (default: false)</p>
2522 </dd>
2523 </dl>
2524 </div>
2525 <div class="section" id="templatealias">
2526 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">templatealias</tt></a></h2>
2527 <p>Alias definitions for templates. See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for details.</p>
2528 </div>
2529 <div class="section" id="templates">
2530 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">templates</tt></a></h2>
2531 <p>Use the <tt class="docutils literal">[templates]</tt> section to define template strings.
2532 See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for details.</p>
2533 </div>
2534 <div class="section" id="trusted">
2535 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">trusted</tt></a></h2>
2536 <p>Mercurial will not use the settings in the
2537 <tt class="docutils literal">.hg/hgrc</tt> file from a repository if it doesn't belong to a trusted
2538 user or to a trusted group, as various hgrc features allow arbitrary
2539 commands to be run. This issue is often encountered when configuring
2540 hooks or extensions for shared repositories or servers. However,
2541 the web interface will use some safe settings from the <tt class="docutils literal">[web]</tt>
2542 section.</p>
2543 <p>This section specifies what users and groups are trusted. The
2544 current user is always trusted. To trust everybody, list a user or a
2545 group with name <tt class="docutils literal">*</tt>. These settings must be placed in an
2546 <em>already-trusted file</em> to take effect, such as <tt class="docutils literal"><span class="pre">$HOME/.hgrc</span></tt> of the
2547 user or service running Mercurial.</p>
2548 <dl class="docutils">
2549 <dt><tt class="docutils literal">users</tt></dt>
2550 <dd>Comma-separated list of trusted users.</dd>
2551 <dt><tt class="docutils literal">groups</tt></dt>
2552 <dd>Comma-separated list of trusted groups.</dd>
2553 </dl>
2554 </div>
2555 <div class="section" id="ui">
2556 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">ui</tt></a></h2>
2557 <p>User interface controls.</p>
2558 <dl class="docutils">
2559 <dt><tt class="docutils literal">archivemeta</tt></dt>
2560 <dd>Whether to include the .hg_archival.txt file containing meta data
2561 (hashes for the repository base and for tip) in archives created
2562 by the <a class="reference external" href="hg-archive.html"><tt class="docutils literal">hg archive</tt></a> command or downloaded via hgweb.
2563 (default: True)</dd>
2564 <dt><tt class="docutils literal">askusername</tt></dt>
2565 <dd>Whether to prompt for a username when committing. If True, and
2566 neither <tt class="docutils literal">$HGUSER</tt> nor <tt class="docutils literal">$EMAIL</tt> has been specified, then the user will
2567 be prompted to enter a username. If no username is entered, the
2568 default <tt class="docutils literal">USER&#64;HOST</tt> is used instead.
2569 (default: False)</dd>
2570 <dt><tt class="docutils literal">clonebundles</tt></dt>
2571 <dd><p class="first">Whether the &quot;clone bundles&quot; feature is enabled.</p>
2572 <p>When enabled, <a class="reference external" href="hg-clone.html"><tt class="docutils literal">hg clone</tt></a> may download and apply a server-advertised
2573 bundle file from a URL instead of using the normal exchange mechanism.</p>
2574 <p>This can likely result in faster and more reliable clones.</p>
2575 <p class="last">(default: True)</p>
2576 </dd>
2577 <dt><tt class="docutils literal">clonebundlefallback</tt></dt>
2578 <dd><p class="first">Whether failure to apply an advertised &quot;clone bundle&quot; from a server
2579 should result in fallback to a regular clone.</p>
2580 <p>This is disabled by default because servers advertising &quot;clone
2581 bundles&quot; often do so to reduce server load. If advertised bundles
2582 start mass failing and clients automatically fall back to a regular
2583 clone, this would add significant and unexpected load to the server
2584 since the server is expecting clone operations to be offloaded to
2585 pre-generated bundles. Failing fast (the default behavior) ensures
2586 clients don't overwhelm the server when &quot;clone bundle&quot; application
2587 fails.</p>
2588 <p class="last">(default: False)</p>
2589 </dd>
2590 <dt><tt class="docutils literal">clonebundleprefers</tt></dt>
2591 <dd><p class="first">Defines preferences for which &quot;clone bundles&quot; to use.</p>
2592 <p>Servers advertising &quot;clone bundles&quot; may advertise multiple available
2593 bundles. Each bundle may have different attributes, such as the bundle
2594 type and compression format. This option is used to prefer a particular
2595 bundle over another.</p>
2596 <p>The following keys are defined by Mercurial:</p>
2597 <dl class="docutils">
2598 <dt>BUNDLESPEC</dt>
2599 <dd>A bundle type specifier. These are strings passed to <a class="reference external" href="hg-bundle.html"><tt class="docutils literal">hg bundle <span class="pre">-t</span></tt></a>.
2600 e.g. <tt class="docutils literal"><span class="pre">gzip-v2</span></tt> or <tt class="docutils literal"><span class="pre">bzip2-v1</span></tt>.</dd>
2601 <dt>COMPRESSION</dt>
2602 <dd>The compression format of the bundle. e.g. <tt class="docutils literal">gzip</tt> and <tt class="docutils literal">bzip2</tt>.</dd>
2603 </dl>
2604 <p>Server operators may define custom keys.</p>
2605 <p>Example values: <tt class="docutils literal">COMPRESSION=bzip2</tt>,
2606 <tt class="docutils literal"><span class="pre">BUNDLESPEC=gzip-v2,</span> COMPRESSION=gzip</tt>.</p>
2607 <p class="last">By default, the first bundle advertised by the server is used.</p>
2608 </dd>
2609 <dt><tt class="docutils literal">color</tt></dt>
2610 <dd>When to colorize output. Possible value are Boolean (&quot;yes&quot; or &quot;no&quot;), or
2611 &quot;debug&quot;, or &quot;always&quot;. (default: &quot;yes&quot;). &quot;yes&quot; will use color whenever it
2612 seems possible. See <a class="reference external" href="topic-color.html"><tt class="docutils literal">hg help color</tt></a> for details.</dd>
2613 <dt><tt class="docutils literal">commitsubrepos</tt></dt>
2614 <dd>Whether to commit modified subrepositories when committing the
2615 parent repository. If False and one subrepository has uncommitted
2616 changes, abort the commit.
2617 (default: False)</dd>
2618 <dt><tt class="docutils literal">debug</tt></dt>
2619 <dd>Print debugging information. (default: False)</dd>
2620 <dt><tt class="docutils literal">editor</tt></dt>
2621 <dd>The editor to use during a commit. (default: <tt class="docutils literal">$EDITOR</tt> or <tt class="docutils literal">vi</tt>)</dd>
2622 <dt><tt class="docutils literal">fallbackencoding</tt></dt>
2623 <dd>Encoding to try if it's not possible to decode the changelog using
2624 UTF-8. (default: ISO-8859-1)</dd>
2625 <dt><tt class="docutils literal">graphnodetemplate</tt></dt>
2626 <dd>(DEPRECATED) Use <tt class="docutils literal"><span class="pre">command-templates.graphnode</span></tt> instead.</dd>
2627 <dt><tt class="docutils literal">ignore</tt></dt>
2628 <dd>A file to read per-user ignore patterns from. This file should be
2629 in the same format as a repository-wide .hgignore file. Filenames
2630 are relative to the repository root. This option supports hook syntax,
2631 so if you want to specify multiple ignore files, you can do so by
2632 setting something like <tt class="docutils literal">ignore.other = <span class="pre">~/.hgignore2</span></tt>. For details
2633 of the ignore file format, see the <tt class="docutils literal">hgignore(5)</tt> man page.</dd>
2634 <dt><tt class="docutils literal">interactive</tt></dt>
2635 <dd>Allow to prompt the user. (default: True)</dd>
2636 <dt><tt class="docutils literal">interface</tt></dt>
2637 <dd>Select the default interface for interactive features (default: text).
2638 Possible values are 'text' and 'curses'.</dd>
2639 <dt><tt class="docutils literal">interface.chunkselector</tt></dt>
2640 <dd>Select the interface for change recording (e.g. <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit <span class="pre">-i</span></tt></a>).
2641 Possible values are 'text' and 'curses'.
2642 This config overrides the interface specified by ui.interface.</dd>
2643 <dt><tt class="docutils literal"><span class="pre">large-file-limit</span></tt></dt>
2644 <dd>Largest file size that gives no memory use warning.
2645 Possible values are integers or 0 to disable the check.
2646 Value is expressed in bytes by default, one can use standard units for
2647 convenience (e.g. 10MB, 0.1GB, etc) (default: 10MB)</dd>
2648 <dt><tt class="docutils literal">logtemplate</tt></dt>
2649 <dd>(DEPRECATED) Use <tt class="docutils literal"><span class="pre">command-templates.log</span></tt> instead.</dd>
2650 <dt><tt class="docutils literal">merge</tt></dt>
2651 <dd>The conflict resolution program to use during a manual merge.
2652 For more information on merge tools see <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a>.
2653 For configuring merge tools see the <tt class="docutils literal"><span class="pre">[merge-tools]</span></tt> section.</dd>
2654 <dt><tt class="docutils literal">mergemarkers</tt></dt>
2655 <dd>Sets the merge conflict marker label styling. The <tt class="docutils literal">detailed</tt> style
2656 uses the <tt class="docutils literal"><span class="pre">command-templates.mergemarker</span></tt> setting to style the labels.
2657 The <tt class="docutils literal">basic</tt> style just uses 'local' and 'other' as the marker label.
2658 One of <tt class="docutils literal">basic</tt> or <tt class="docutils literal">detailed</tt>.
2659 (default: <tt class="docutils literal">basic</tt>)</dd>
2660 <dt><tt class="docutils literal">mergemarkertemplate</tt></dt>
2661 <dd>(DEPRECATED) Use <tt class="docutils literal"><span class="pre">command-templates.mergemarker</span></tt> instead.</dd>
2662 <dt><tt class="docutils literal"><span class="pre">message-output</span></tt></dt>
2663 <dd><p class="first">Where to write status and error messages. (default: <tt class="docutils literal">stdio</tt>)</p>
2664 <dl class="last docutils">
2665 <dt><tt class="docutils literal">channel</tt></dt>
2666 <dd>Use separate channel for structured output. (Command-server only)</dd>
2667 <dt><tt class="docutils literal">stderr</tt></dt>
2668 <dd>Everything to stderr.</dd>
2669 <dt><tt class="docutils literal">stdio</tt></dt>
2670 <dd>Status to stdout, and error to stderr.</dd>
2671 </dl>
2672 </dd>
2673 <dt><tt class="docutils literal">origbackuppath</tt></dt>
2674 <dd>The path to a directory used to store generated .orig files. If the path is
2675 not a directory, one will be created. If set, files stored in this
2676 directory have the same name as the original file and do not have a .orig
2677 suffix.</dd>
2678 <dt><tt class="docutils literal">paginate</tt></dt>
2679 <dd>Control the pagination of command output (default: True). See <a class="reference external" href="topic-pager.html"><tt class="docutils literal">hg help pager</tt></a>
2680 for details.</dd>
2681 <dt><tt class="docutils literal">patch</tt></dt>
2682 <dd><p class="first">An optional external tool that <tt class="docutils literal">hg import</tt> and some extensions
2683 will use for applying patches. By default Mercurial uses an
2684 internal patch utility. The external tool must work as the common
2685 Unix <tt class="docutils literal">patch</tt> program. In particular, it must accept a <tt class="docutils literal"><span class="pre">-p</span></tt>
2686 argument to strip patch headers, a <tt class="docutils literal"><span class="pre">-d</span></tt> argument to specify the
2687 current directory, a file name to patch, and a patch file to take
2688 from stdin.</p>
2689 <p class="last">It is possible to specify a patch tool together with extra
2690 arguments. For example, setting this option to <tt class="docutils literal">patch <span class="pre">--merge</span></tt>
2691 will use the <tt class="docutils literal">patch</tt> program with its 2-way merge option.</p>
2692 </dd>
2693 <dt><tt class="docutils literal">portablefilenames</tt></dt>
2694 <dd><p class="first">Check for portable filenames. Can be <tt class="docutils literal">warn</tt>, <tt class="docutils literal">ignore</tt> or <tt class="docutils literal">abort</tt>.
2695 (default: <tt class="docutils literal">warn</tt>)</p>
2696 <dl class="docutils">
2697 <dt><tt class="docutils literal">warn</tt></dt>
2698 <dd>Print a warning message on POSIX platforms, if a file with a non-portable
2699 filename is added (e.g. a file with a name that can't be created on
2700 Windows because it contains reserved parts like <tt class="docutils literal">AUX</tt>, reserved
2701 characters like <tt class="docutils literal">:</tt>, or would cause a case collision with an existing
2702 file).</dd>
2703 <dt><tt class="docutils literal">ignore</tt></dt>
2704 <dd>Don't print a warning.</dd>
2705 <dt><tt class="docutils literal">abort</tt></dt>
2706 <dd>The command is aborted.</dd>
2707 <dt><tt class="docutils literal">true</tt></dt>
2708 <dd>Alias for <tt class="docutils literal">warn</tt>.</dd>
2709 <dt><tt class="docutils literal">false</tt></dt>
2710 <dd>Alias for <tt class="docutils literal">ignore</tt>.</dd>
2711 </dl>
2712 <div class="windows last docutils container">
2713 On Windows, this configuration option is ignored and the command aborted.</div>
2714 </dd>
2715 <dt><tt class="docutils literal"><span class="pre">pre-merge-tool-output-template</span></tt></dt>
2716 <dd>(DEPRECATED) Use <tt class="docutils literal"><span class="pre">command-template.pre-merge-tool-output</span></tt> instead.</dd>
2717 <dt><tt class="docutils literal">quiet</tt></dt>
2718 <dd>Reduce the amount of output printed.
2719 (default: False)</dd>
2720 <dt><tt class="docutils literal"><span class="pre">relative-paths</span></tt></dt>
2721 <dd>Prefer relative paths in the UI.</dd>
2722 <dt><tt class="docutils literal">remotecmd</tt></dt>
2723 <dd>Remote command to use for clone/push/pull operations.
2724 (default: <tt class="docutils literal">hg</tt>)</dd>
2725 <dt><tt class="docutils literal">report_untrusted</tt></dt>
2726 <dd>Warn if a <tt class="docutils literal">.hg/hgrc</tt> file is ignored due to not being owned by a
2727 trusted user or group.
2728 (default: True)</dd>
2729 <dt><tt class="docutils literal">slash</tt></dt>
2730 <dd><p class="first">(Deprecated. Use <tt class="docutils literal">slashpath</tt> template filter instead.)</p>
2731 <p class="last">Display paths using a slash (<tt class="docutils literal">/</tt>) as the path separator. This
2732 only makes a difference on systems where the default path
2733 separator is not the slash character (e.g. Windows uses the
2734 backslash character (<tt class="docutils literal">\</tt>)).
2735 (default: False)</p>
2736 </dd>
2737 <dt><tt class="docutils literal">statuscopies</tt></dt>
2738 <dd>Display copies in the status command.</dd>
2739 <dt><tt class="docutils literal">ssh</tt></dt>
2740 <dd>Command to use for SSH connections. (default: <tt class="docutils literal">ssh</tt>)</dd>
2741 <dt><tt class="docutils literal">ssherrorhint</tt></dt>
2742 <dd>A hint shown to the user in the case of SSH error (e.g.
2743 <tt class="docutils literal">Please see <span class="pre">http://company/internalwiki/ssh.html</span></tt>)</dd>
2744 <dt><tt class="docutils literal">strict</tt></dt>
2745 <dd>Require exact command names, instead of allowing unambiguous
2746 abbreviations. (default: False)</dd>
2747 <dt><tt class="docutils literal">style</tt></dt>
2748 <dd>Name of style to use for command output.</dd>
2749 <dt><tt class="docutils literal">supportcontact</tt></dt>
2750 <dd>A URL where users should report a Mercurial traceback. Use this if you are a
2751 large organisation with its own Mercurial deployment process and crash
2752 reports should be addressed to your internal support.</dd>
2753 <dt><tt class="docutils literal">textwidth</tt></dt>
2754 <dd>Maximum width of help text. A longer line generated by <tt class="docutils literal">hg help</tt> or
2755 <tt class="docutils literal">hg subcommand <span class="pre">--help</span></tt> will be broken after white space to get this
2756 width or the terminal width, whichever comes first.
2757 A non-positive value will disable this and the terminal width will be
2758 used. (default: 78)</dd>
2759 <dt><tt class="docutils literal">timeout</tt></dt>
2760 <dd>The timeout used when a lock is held (in seconds), a negative value
2761 means no timeout. (default: 600)</dd>
2762 <dt><tt class="docutils literal">timeout.warn</tt></dt>
2763 <dd>Time (in seconds) before a warning is printed about held lock. A negative
2764 value means no warning. (default: 0)</dd>
2765 <dt><tt class="docutils literal">traceback</tt></dt>
2766 <dd>Mercurial always prints a traceback when an unknown exception
2767 occurs. Setting this to True will make Mercurial print a traceback
2768 on all exceptions, even those recognized by Mercurial (such as
2769 IOError or MemoryError). (default: False)</dd>
2770 </dl>
2771 <p><tt class="docutils literal">tweakdefaults</tt></p>
2772 <blockquote>
2773 <p>By default Mercurial's behavior changes very little from release
2774 to release, but over time the recommended config settings
2775 shift. Enable this config to opt in to get automatic tweaks to
2776 Mercurial's behavior over time. This config setting will have no
2777 effect if <tt class="docutils literal">HGPLAIN</tt> is set or <tt class="docutils literal">HGPLAINEXCEPT</tt> is set and does
2778 not include <tt class="docutils literal">tweakdefaults</tt>. (default: False)</p>
2779 <p>It currently means:</p>
2780 <pre class="literal-block">
2781 [ui]
2782 # The rollback command is dangerous. As a rule, don't use it.
2783 rollback = False
2784 # Make `hg status` report copy information
2785 statuscopies = yes
2786 # Prefer curses UIs when available. Revert to plain-text with `text`.
2787 interface = curses
2788 # Make compatible commands emit cwd-relative paths by default.
2789 relative-paths = yes
2790
2791 [commands]
2792 # Grep working directory by default.
2793 grep.all-files = True
2794 # Refuse to perform an `hg update` that would cause a file content merge
2795 update.check = noconflict
2796 # Show conflicts information in `hg status`
2797 status.verbose = True
2798 # Make `hg resolve` with no action (like `-m`) fail instead of re-merging.
2799 resolve.explicit-re-merge = True
2800
2801 [diff]
2802 git = 1
2803 showfunc = 1
2804 word-diff = 1
2805 </pre>
2806 </blockquote>
2807 <dl class="docutils">
2808 <dt><tt class="docutils literal">username</tt></dt>
2809 <dd><p class="first">The committer of a changeset created when running &quot;commit&quot;.
2810 Typically a person's name and email address, e.g. <tt class="docutils literal">Fred Widget
2811 &lt;fred&#64;example.com&gt;</tt>. Environment variables in the
2812 username are expanded.</p>
2813 <p class="last">(default: <tt class="docutils literal">$EMAIL</tt> or <tt class="docutils literal">username&#64;hostname</tt>. If the username in
2814 hgrc is empty, e.g. if the system admin set <tt class="docutils literal">username =</tt> in the
2815 system hgrc, it has to be specified manually or in a different
2816 hgrc file)</p>
2817 </dd>
2818 <dt><tt class="docutils literal">verbose</tt></dt>
2819 <dd>Increase the amount of output printed. (default: False)</dd>
2820 </dl>
2821 </div>
2822 <div class="section" id="usage">
2823 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">usage</tt></a></h2>
2824 <dl class="docutils">
2825 <dt><tt class="docutils literal"><span class="pre">repository-role</span></tt></dt>
2826 <dd><p class="first">What this repository is used for.</p>
2827 <p>This is used to adjust behavior and performance to best fit the repository purpose.</p>
2828 <p>Currently recognised values are:</p>
2829 <ul class="last simple">
2830 <li><tt class="docutils literal">default</tt>: an all purpose repository</li>
2831 </ul>
2832 </dd>
2833 <dt><tt class="docutils literal">resources</tt></dt>
2834 <dd><p class="first">How aggressive Mercurial can be with resource usage:</p>
2835 <p>Currently recognised values are:</p>
2836 <ul class="simple">
2837 <li><tt class="docutils literal">default</tt>: the default value currently is equivalent to medium,</li>
2838 <li><tt class="docutils literal">high</tt>: allows for higher cpu, memory and disk-space usage to improve
2839 performance of some operations.</li>
2840 <li><tt class="docutils literal">medium</tt>: aims at a moderate resource usage,</li>
2841 <li><tt class="docutils literal">low</tt>: reduces resources usage when possible, decreasing overall
2842 performance.</li>
2843 </ul>
2844 <p class="last">For finer configuration, see also <cite>usage.resources.cpu</cite>,
2845 <cite>usage.resources.disk</cite> and <cite>usage.resources.memory</cite>.</p>
2846 </dd>
2847 <dt><tt class="docutils literal">resources.cpu</tt></dt>
2848 <dd><p class="first">How aggressive Mercurial can be in terms of cpu usage:</p>
2849 <p>Currently recognised values are:</p>
2850 <ul class="last simple">
2851 <li><tt class="docutils literal">default</tt>: the default value, inherits the value from <cite>usage.resources</cite>,</li>
2852 <li><tt class="docutils literal">high</tt>: allows for more aggressive cpu usage, improving storage quality
2853 and the performance of some operations at the expense of machine load</li>
2854 <li><cite>medium</cite>: aims at a moderate cpu usage,</li>
2855 <li><cite>low</cite>: reduces cpu usage when possible, potentially at the expense of
2856 slower operations, increased storage and exchange payload.</li>
2857 </ul>
2858 </dd>
2859 <dt><tt class="docutils literal">resources.disk</tt></dt>
2860 <dd><p class="first">How aggressive Mercurial can be in terms of disk usage:</p>
2861 <p>Currently recognised values are::
2862 - <tt class="docutils literal">default</tt>: the default value, inherits the value from <cite>usage.resources</cite>,</p>
2863 <ul class="last simple">
2864 <li><tt class="docutils literal">high</tt>: allows for more disk space usage where it can improve performance,</li>
2865 <li><tt class="docutils literal">medium</tt>: aims at a moderate disk usage,</li>
2866 <li><tt class="docutils literal">low</tt>: reduces disk usage when possible, decreasing performance in some
2867 occasion.</li>
2868 </ul>
2869 </dd>
2870 <dt><tt class="docutils literal">resources.memory</tt></dt>
2871 <dd><p class="first">How aggressive Mercurial can be in terms of memory usage:</p>
2872 <p>Currently recognised values are:</p>
2873 <pre class="literal-block">
2874 - ``default``: the default value, inherits the value from `usage.resources`,
2875 </pre>
2876 <ul class="last simple">
2877 <li><tt class="docutils literal">high</tt>: allows for more aggressive memory usage to improve overall
2878 performance,</li>
2879 <li><tt class="docutils literal">medium</tt>: aims at a moderate memory usage,</li>
2880 <li><tt class="docutils literal">low</tt>: reduces memory usage when possible at the cost of overall
2881 performance.</li>
2882 </ul>
2883 </dd>
2884 <dt><tt class="docutils literal">resources.bandwidth</tt></dt>
2885 <dd><p class="first">How aggressive Mercurial can be in terms of bandwidth usage:</p>
2886 <p>Currently recognised values are:</p>
2887 <pre class="literal-block">
2888 - ``default``: the default value, inherits the value from `usage.resources`,
2889 </pre>
2890 <ul class="last simple">
2891 <li><tt class="docutils literal">high</tt>: allows for more aggressive bandwidth usage to improve overall
2892 performance,</li>
2893 <li><tt class="docutils literal">medium</tt>: aims at a moderate bandwidth usage,</li>
2894 <li><tt class="docutils literal">low</tt>: reduces bandwidth usage when possible at the cost of overall
2895 performance.</li>
2896 </ul>
2897 </dd>
2898 </dl>
2899 </div>
2900 <div class="section" id="command-templates">
2901 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal"><span class="pre">command-templates</span></tt></a></h2>
2902 <p>Templates used for customizing the output of commands.</p>
2903 <dl class="docutils">
2904 <dt><tt class="docutils literal">graphnode</tt></dt>
2905 <dd>The template used to print changeset nodes in an ASCII revision graph.
2906 (default: <tt class="docutils literal">{graphnode}</tt>)</dd>
2907 <dt><tt class="docutils literal">log</tt></dt>
2908 <dd>Template string for commands that print changesets.</dd>
2909 <dt><tt class="docutils literal">mergemarker</tt></dt>
2910 <dd><p class="first">The template used to print the commit description next to each conflict
2911 marker during merge conflicts. See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for the template
2912 format.</p>
2913 <p>Defaults to showing the hash, tags, branches, bookmarks, author, and
2914 the first line of the commit description.</p>
2915 <p>If you use non-ASCII characters in names for tags, branches, bookmarks,
2916 authors, and/or commit descriptions, you must pay attention to encodings of
2917 managed files. At template expansion, non-ASCII characters use the encoding
2918 specified by the <tt class="docutils literal"><span class="pre">--encoding</span></tt> global option, <tt class="docutils literal">HGENCODING</tt> or other
2919 environment variables that govern your locale. If the encoding of the merge
2920 markers is different from the encoding of the merged files,
2921 serious problems may occur.</p>
2922 <p class="last">Can be overridden per-merge-tool, see the <tt class="docutils literal"><span class="pre">[merge-tools]</span></tt> section.</p>
2923 </dd>
2924 <dt><tt class="docutils literal"><span class="pre">oneline-summary</span></tt></dt>
2925 <dd><p class="first">A template used by <cite>hg rebase</cite> and other commands for showing a one-line
2926 summary of a commit. If the template configured here is longer than one
2927 line, then only the first line is used.</p>
2928 <p class="last">The template can be overridden per command by defining a template in
2929 <cite>oneline-summary.&lt;command&gt;</cite>, where <cite>&lt;command&gt;</cite> can be e.g. &quot;rebase&quot;.</p>
2930 </dd>
2931 <dt><tt class="docutils literal"><span class="pre">pre-merge-tool-output</span></tt></dt>
2932 <dd><p class="first">A template that is printed before executing an external merge tool. This can
2933 be used to print out additional context that might be useful to have during
2934 the conflict resolution, such as the description of the various commits
2935 involved or bookmarks/tags.</p>
2936 <p class="last">Additional information is available in the <tt class="docutils literal">local`, ``base</tt>, and <tt class="docutils literal">other</tt>
2937 dicts. For example: <tt class="docutils literal">{local.label}</tt>, <tt class="docutils literal">{base.name}</tt>, or
2938 <tt class="docutils literal">{other.islink}</tt>.</p>
2939 </dd>
2940 </dl>
2941 </div>
2942 <div class="section" id="web">
2943 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">web</tt></a></h2>
2944 <p>Web interface configuration. The settings in this section apply to
2945 both the builtin webserver (started by <a class="reference external" href="hg-serve.html"><tt class="docutils literal">hg serve</tt></a>) and the script you
2946 run through a webserver (<tt class="docutils literal">hgweb.cgi</tt> and the derivatives for FastCGI
2947 and WSGI).</p>
2948 <p>The Mercurial webserver does no authentication (it does not prompt for
2949 usernames and passwords to validate <em>who</em> users are), but it does do
2950 authorization (it grants or denies access for <em>authenticated users</em>
2951 based on settings in this section). You must either configure your
2952 webserver to do authentication for you, or disable the authorization
2953 checks.</p>
2954 <p>For a quick setup in a trusted environment, e.g., a private LAN, where
2955 you want it to accept pushes from anybody, you can use the following
2956 command line:</p>
2957 <pre class="literal-block">
2958 $ hg --config web.allow-push=* --config web.push_ssl=False serve
2959 </pre>
2960 <p>Note that this will allow anybody to push anything to the server and
2961 that this should not be used for public servers.</p>
2962 <p>The full set of options is:</p>
2963 <dl class="docutils">
2964 <dt><tt class="docutils literal">accesslog</tt></dt>
2965 <dd>Where to output the access log. (default: stdout)</dd>
2966 <dt><tt class="docutils literal">address</tt></dt>
2967 <dd>Interface address to bind to. (default: all)</dd>
2968 <dt><tt class="docutils literal"><span class="pre">allow-archive</span></tt></dt>
2969 <dd>List of archive format (bz2, gz, zip) allowed for downloading.
2970 (default: empty)</dd>
2971 <dt><tt class="docutils literal">allowbz2</tt></dt>
2972 <dd>(DEPRECATED) Whether to allow .tar.bz2 downloading of repository
2973 revisions.
2974 (default: False)</dd>
2975 <dt><tt class="docutils literal">allowgz</tt></dt>
2976 <dd>(DEPRECATED) Whether to allow .tar.gz downloading of repository
2977 revisions.
2978 (default: False)</dd>
2979 <dt><tt class="docutils literal"><span class="pre">allow-pull</span></tt></dt>
2980 <dd>Whether to allow pulling from the repository. (default: True)</dd>
2981 <dt><tt class="docutils literal"><span class="pre">allow-push</span></tt></dt>
2982 <dd>Whether to allow pushing to the repository. If empty or not set,
2983 pushing is not allowed. If the special value <tt class="docutils literal">*</tt>, any remote
2984 user can push, including unauthenticated users. Otherwise, the
2985 remote user must have been authenticated, and the authenticated
2986 user name must be present in this list. The contents of the
2987 allow-push list are examined after the deny_push list.</dd>
2988 <dt><tt class="docutils literal">allow_read</tt></dt>
2989 <dd>If the user has not already been denied repository access due to
2990 the contents of deny_read, this list determines whether to grant
2991 repository access to the user. If this list is not empty, and the
2992 user is unauthenticated or not present in the list, then access is
2993 denied for the user. If the list is empty or not set, then access
2994 is permitted to all users by default. Setting allow_read to the
2995 special value <tt class="docutils literal">*</tt> is equivalent to it not being set (i.e. access
2996 is permitted to all users). The contents of the allow_read list are
2997 examined after the deny_read list.</dd>
2998 <dt><tt class="docutils literal">allowzip</tt></dt>
2999 <dd>(DEPRECATED) Whether to allow .zip downloading of repository
3000 revisions. This feature creates temporary files.
3001 (default: False)</dd>
3002 <dt><tt class="docutils literal">archivesubrepos</tt></dt>
3003 <dd>Whether to recurse into subrepositories when archiving.
3004 (default: False)</dd>
3005 <dt><tt class="docutils literal">baseurl</tt></dt>
3006 <dd>Base URL to use when publishing URLs in other locations, so
3007 third-party tools like email notification hooks can construct
3008 URLs. Example: <tt class="docutils literal"><span class="pre">http://hgserver/repos/</span></tt>.</dd>
3009 <dt><tt class="docutils literal">cacerts</tt></dt>
3010 <dd><p class="first">Path to file containing a list of PEM encoded certificate
3011 authority certificates. Environment variables and <tt class="docutils literal">~user</tt>
3012 constructs are expanded in the filename. If specified on the
3013 client, then it will verify the identity of remote HTTPS servers
3014 with these certificates.</p>
3015 <p>To disable SSL verification temporarily, specify <tt class="docutils literal"><span class="pre">--insecure</span></tt> from
3016 command line.</p>
3017 <p>You can use OpenSSL's CA certificate file if your platform has
3018 one. On most Linux systems this will be
3019 <tt class="docutils literal"><span class="pre">/etc/ssl/certs/ca-certificates.crt</span></tt>. Otherwise you will have to
3020 generate this file manually. The form must be as follows:</p>
3021 <pre class="last literal-block">
3022 -----BEGIN CERTIFICATE-----
3023 ... (certificate in base64 PEM encoding) ...
3024 -----END CERTIFICATE-----
3025 -----BEGIN CERTIFICATE-----
3026 ... (certificate in base64 PEM encoding) ...
3027 -----END CERTIFICATE-----
3028 </pre>
3029 </dd>
3030 <dt><tt class="docutils literal">cache</tt></dt>
3031 <dd>Whether to support caching in hgweb. (default: True)</dd>
3032 <dt><tt class="docutils literal">certificate</tt></dt>
3033 <dd>Certificate to use when running <a class="reference external" href="hg-serve.html"><tt class="docutils literal">hg serve</tt></a>.</dd>
3034 <dt><tt class="docutils literal">collapse</tt></dt>
3035 <dd>With <tt class="docutils literal">descend</tt> enabled, repositories in subdirectories are shown at
3036 a single level alongside repositories in the current path. With
3037 <tt class="docutils literal">collapse</tt> also enabled, repositories residing at a deeper level than
3038 the current path are grouped behind navigable directory entries that
3039 lead to the locations of these repositories. In effect, this setting
3040 collapses each collection of repositories found within a subdirectory
3041 into a single entry for that subdirectory. (default: False)</dd>
3042 <dt><tt class="docutils literal">comparisoncontext</tt></dt>
3043 <dd><p class="first">Number of lines of context to show in side-by-side file comparison. If
3044 negative or the value <tt class="docutils literal">full</tt>, whole files are shown. (default: 5)</p>
3045 <p class="last">This setting can be overridden by a <tt class="docutils literal">context</tt> request parameter to the
3046 <tt class="docutils literal">comparison</tt> command, taking the same values.</p>
3047 </dd>
3048 <dt><tt class="docutils literal">contact</tt></dt>
3049 <dd>Name or email address of the person in charge of the repository.
3050 (default: ui.username or <tt class="docutils literal">$EMAIL</tt> or &quot;unknown&quot; if unset or empty)</dd>
3051 <dt><tt class="docutils literal">csp</tt></dt>
3052 <dd><p class="first">Send a <tt class="docutils literal"><span class="pre">Content-Security-Policy</span></tt> HTTP header with this value.</p>
3053 <p>The value may contain a special string <tt class="docutils literal">%nonce%</tt>, which will be replaced
3054 by a randomly-generated one-time use value. If the value contains
3055 <tt class="docutils literal">%nonce%</tt>, <tt class="docutils literal">web.cache</tt> will be disabled, as caching undermines the
3056 one-time property of the nonce. This nonce will also be inserted into
3057 <tt class="docutils literal">&lt;script&gt;</tt> elements containing inline JavaScript.</p>
3058 <p class="last">Note: lots of HTML content sent by the server is derived from repository
3059 data. Please consider the potential for malicious repository data to
3060 &quot;inject&quot; itself into generated HTML content as part of your security
3061 threat model.</p>
3062 </dd>
3063 <dt><tt class="docutils literal">deny_push</tt></dt>
3064 <dd>Whether to deny pushing to the repository. If empty or not set,
3065 push is not denied. If the special value <tt class="docutils literal">*</tt>, all remote users are
3066 denied push. Otherwise, unauthenticated users are all denied, and
3067 any authenticated user name present in this list is also denied. The
3068 contents of the deny_push list are examined before the allow-push list.</dd>
3069 <dt><tt class="docutils literal">deny_read</tt></dt>
3070 <dd>Whether to deny reading/viewing of the repository. If this list is
3071 not empty, unauthenticated users are all denied, and any
3072 authenticated user name present in this list is also denied access to
3073 the repository. If set to the special value <tt class="docutils literal">*</tt>, all remote users
3074 are denied access (rarely needed ;). If deny_read is empty or not set,
3075 the determination of repository access depends on the presence and
3076 content of the allow_read list (see description). If both
3077 deny_read and allow_read are empty or not set, then access is
3078 permitted to all users by default. If the repository is being
3079 served via hgwebdir, denied users will not be able to see it in
3080 the list of repositories. The contents of the deny_read list have
3081 priority over (are examined before) the contents of the allow_read
3082 list.</dd>
3083 <dt><tt class="docutils literal">descend</tt></dt>
3084 <dd>hgwebdir indexes will not descend into subdirectories. Only repositories
3085 directly in the current path will be shown (other repositories are still
3086 available from the index corresponding to their containing path).</dd>
3087 <dt><tt class="docutils literal">description</tt></dt>
3088 <dd>Textual description of the repository's purpose or contents.
3089 (default: &quot;unknown&quot;)</dd>
3090 <dt><tt class="docutils literal">encoding</tt></dt>
3091 <dd>Character encoding name. (default: the current locale charset)
3092 Example: &quot;UTF-8&quot;.</dd>
3093 <dt><tt class="docutils literal">errorlog</tt></dt>
3094 <dd>Where to output the error log. (default: stderr)</dd>
3095 <dt><tt class="docutils literal">guessmime</tt></dt>
3096 <dd>Control MIME types for raw download of file content.
3097 Set to True to let hgweb guess the content type from the file
3098 extension. This will serve HTML files as <tt class="docutils literal">text/html</tt> and might
3099 allow cross-site scripting attacks when serving untrusted
3100 repositories. (default: False)</dd>
3101 <dt><tt class="docutils literal">hidden</tt></dt>
3102 <dd>Whether to hide the repository in the hgwebdir index.
3103 (default: False)</dd>
3104 <dt><tt class="docutils literal">ipv6</tt></dt>
3105 <dd>Whether to use IPv6. (default: False)</dd>
3106 <dt><tt class="docutils literal">labels</tt></dt>
3107 <dd><p class="first">List of string <em>labels</em> associated with the repository.</p>
3108 <p class="last">Labels are exposed as a template keyword and can be used to customize
3109 output. e.g. the <tt class="docutils literal">index</tt> template can group or filter repositories
3110 by labels and the <tt class="docutils literal">summary</tt> template can display additional content
3111 if a specific label is present.</p>
3112 </dd>
3113 <dt><tt class="docutils literal">logoimg</tt></dt>
3114 <dd>File name of the logo image that some templates display on each page.
3115 The file name is relative to <tt class="docutils literal">staticurl</tt>. That is, the full path to
3116 the logo image is &quot;staticurl/logoimg&quot;.
3117 If unset, <tt class="docutils literal">hglogo.png</tt> will be used.</dd>
3118 <dt><tt class="docutils literal">logourl</tt></dt>
3119 <dd>Base URL to use for logos. If unset, <tt class="docutils literal"><span class="pre">https://mercurial-scm.org/</span></tt>
3120 will be used.</dd>
3121 <dt><tt class="docutils literal">maxchanges</tt></dt>
3122 <dd>Maximum number of changes to list on the changelog. (default: 10)</dd>
3123 <dt><tt class="docutils literal">maxfiles</tt></dt>
3124 <dd>Maximum number of files to list per changeset. (default: 10)</dd>
3125 <dt><tt class="docutils literal">maxshortchanges</tt></dt>
3126 <dd>Maximum number of changes to list on the shortlog, graph or filelog
3127 pages. (default: 60)</dd>
3128 <dt><tt class="docutils literal">name</tt></dt>
3129 <dd>Repository name to use in the web interface.
3130 (default: current working directory)</dd>
3131 <dt><tt class="docutils literal">port</tt></dt>
3132 <dd>Port to listen on. (default: 8000)</dd>
3133 <dt><tt class="docutils literal">prefix</tt></dt>
3134 <dd>Prefix path to serve from. (default: '' (server root))</dd>
3135 <dt><tt class="docutils literal">push_ssl</tt></dt>
3136 <dd>Whether to require that inbound pushes be transported over SSL to
3137 prevent password sniffing. (default: True)</dd>
3138 <dt><tt class="docutils literal">refreshinterval</tt></dt>
3139 <dd><p class="first">How frequently directory listings re-scan the filesystem for new
3140 repositories, in seconds. This is relevant when wildcards are used
3141 to define paths. Depending on how much filesystem traversal is
3142 required, refreshing may negatively impact performance.</p>
3143 <p class="last">Values less than or equal to 0 always refresh.
3144 (default: 20)</p>
3145 </dd>
3146 <dt><tt class="docutils literal"><span class="pre">server-header</span></tt></dt>
3147 <dd>Value for HTTP <tt class="docutils literal">Server</tt> response header.</dd>
3148 <dt><tt class="docutils literal">static</tt></dt>
3149 <dd>Directory where static files are served from.</dd>
3150 <dt><tt class="docutils literal">staticurl</tt></dt>
3151 <dd>Base URL to use for static files. If unset, static files (e.g. the
3152 hgicon.png favicon) will be served by the CGI script itself. Use
3153 this setting to serve them directly with the HTTP server.
3154 Example: <tt class="docutils literal"><span class="pre">http://hgserver/static/</span></tt>.</dd>
3155 <dt><tt class="docutils literal">stripes</tt></dt>
3156 <dd>How many lines a &quot;zebra stripe&quot; should span in multi-line output.
3157 Set to 0 to disable. (default: 1)</dd>
3158 <dt><tt class="docutils literal">style</tt></dt>
3159 <dd>Which template map style to use. The available options are the names of
3160 subdirectories in the HTML templates path. (default: <tt class="docutils literal">paper</tt>)
3161 Example: <tt class="docutils literal">monoblue</tt>.</dd>
3162 <dt><tt class="docutils literal">templates</tt></dt>
3163 <dd>Where to find the HTML templates. The default path to the HTML templates
3164 can be obtained from <tt class="docutils literal">hg debuginstall</tt>.</dd>
3165 </dl>
3166 </div>
3167 <div class="section" id="websub">
3168 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">websub</tt></a></h2>
3169 <p>Web substitution filter definition. You can use this section to
3170 define a set of regular expression substitution patterns which
3171 let you automatically modify the hgweb server output.</p>
3172 <p>The default hgweb templates only apply these substitution patterns
3173 on the revision description fields. You can apply them anywhere
3174 you want when you create your own templates by adding calls to the
3175 &quot;websub&quot; filter (usually after calling the &quot;escape&quot; filter).</p>
3176 <p>This can be used, for example, to convert issue references to links
3177 to your issue tracker, or to convert &quot;markdown-like&quot; syntax into
3178 HTML (see the examples below).</p>
3179 <p>Each entry in this section names a substitution filter.
3180 The value of each entry defines the substitution expression itself.
3181 The websub expressions follow the old interhg extension syntax,
3182 which in turn imitates the Unix sed replacement syntax:</p>
3183 <pre class="literal-block">
3184 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
3185 </pre>
3186 <p>You can use any separator other than &quot;/&quot;. The final &quot;i&quot; is optional
3187 and indicates that the search must be case insensitive.</p>
3188 <p>Examples:</p>
3189 <pre class="literal-block">
3190 [websub]
3191 issues = s|issue(\d+)|&lt;a href=&quot;http://bts.example.org/issue\1&quot;&gt;issue\1&lt;/a&gt;|i
3192 italic = s/\b_(\S+)_\b/&lt;i&gt;\1&lt;\/i&gt;/
3193 bold = s/\*\b(\S+)\b\*/&lt;b&gt;\1&lt;\/b&gt;/
3194 </pre>
3195 </div>
3196 <div class="section" id="worker">
3197 <h2><a class="toc-backref" href="#contents"><tt class="docutils literal">worker</tt></a></h2>
3198 <p>Parallel master/worker configuration. We currently perform working
3199 directory updates in parallel on Unix-like systems, which greatly
3200 helps performance.</p>
3201 <dl class="docutils">
3202 <dt><tt class="docutils literal">enabled</tt></dt>
3203 <dd>Whether to enable workers code to be used.
3204 (default: true)</dd>
3205 <dt><tt class="docutils literal">numcpus</tt></dt>
3206 <dd>Number of CPUs to use for parallel operations. A zero or
3207 negative value is treated as <tt class="docutils literal">use the default</tt>.
3208 (default: 4 or the number of CPUs on the system, whichever is larger)</dd>
3209 <dt><tt class="docutils literal">backgroundclose</tt></dt>
3210 <dd>Whether to enable closing file handles on background threads during certain
3211 operations. Some platforms aren't very efficient at closing file
3212 handles that have been written or appended to. By performing file closing
3213 on background threads, file write rate can increase substantially.
3214 (default: true on Windows, false elsewhere)</dd>
3215 <dt><tt class="docutils literal">backgroundcloseminfilecount</tt></dt>
3216 <dd>Minimum number of files required to trigger background file closing.
3217 Operations not writing this many files won't start background close
3218 threads.
3219 (default: 2048)</dd>
3220 <dt><tt class="docutils literal">backgroundclosemaxqueue</tt></dt>
3221 <dd>The maximum number of opened file handles waiting to be closed in the
3222 background. This option only has an effect if <tt class="docutils literal">backgroundclose</tt> is
3223 enabled.
3224 (default: 384)</dd>
3225 <dt><tt class="docutils literal">backgroundclosethreadcount</tt></dt>
3226 <dd>Number of threads to process background file closes. Only relevant if
3227 <tt class="docutils literal">backgroundclose</tt> is enabled.
3228 (default: 4)</dd>
3229 <dt><tt class="docutils literal"><span class="pre">parallel-stream-bundle-processing</span></tt></dt>
3230 <dd><p class="first">Read, parse and write stream bundle in parallel speeding up the process.</p>
3231 <p>Also see <cite>worker.parallel-stream-bundle-processing.memory-target</cite> to control
3232 the memory usage of the buffers.</p>
3233 <p class="last">Also see <cite>worker.parallel-stream-bundle-processing.num-writer</cite> to control the
3234 amount of concurrent writers.</p>
3235 </dd>
3236 <dt><tt class="docutils literal"><span class="pre">parallel-stream-bundle-processing.memory-target</span></tt></dt>
3237 <dd><p class="first">Limit memory usage around this value. This is not a hard target a Mercurial will use a bit more, but this reduce the amount of buffered stream content that we read ahead.</p>
3238 <p>If set to a negative value, the amount of memory used will not be restricted.</p>
3239 <p>When set to 0, the default value depends on the value of the
3240 <cite>usage.resources.memory</cite> configuration:</p>
3241 <ul class="last simple">
3242 <li>low: 100 MB</li>
3243 <li>medium: 500 MB (default)</li>
3244 <li>high: 2 GB</li>
3245 </ul>
3246 </dd>
3247 <dt><tt class="docutils literal"><span class="pre">parallel-stream-bundle-processing.num-writer</span></tt></dt>
3248 <dd><p class="first">Control the number of file being written concurrently when applying a stream
3249 bundle.</p>
3250 <p>When set to 0, the default, the value used depends on the value of the
3251 <cite>usage.resources.cpu</cite> configuration:</p>
3252 <ul class="last simple">
3253 <li>low: 1 writer</li>
3254 <li>medium: 4 writers (default)</li>
3255 <li>high: 8 writers</li>
3256 </ul>
3257 </dd>
3258 </dl>
3259 </div>
3260 </div>
3261 </div>
3262 </body>
3263 </html>