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