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