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