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