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