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