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