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