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