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