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