1HGRC(5) Mercurial Manual HGRC(5)
2
3
4
6 hgrc - configuration files for Mercurial
7
9 The Mercurial system uses a set of configuration files to control as‐
10 pects of its behavior.
11
13 If you're having problems with your configuration, hg config --source
14 can help you understand what is introducing a setting into your envi‐
15 ronment.
16
17 See hg help config.syntax and hg help config.files for information
18 about how and where to override things.
19
21 The configuration files use a simple ini-file format. A configuration
22 file consists of sections, led by a [section] header and followed by
23 name = value entries:
24
25 [ui]
26 username = Firstname Lastname <firstname.lastname@example.net>
27 verbose = True
28
29 The above entries will be referred to as ui.username and ui.verbose,
30 respectively. See hg help config.syntax.
31
33 Mercurial reads configuration data from several files, if they exist.
34 These files do not exist by default and you will have to create the ap‐
35 propriate configuration files yourself:
36
37 Local configuration is put into the per-repository <repo>/.hg/hgrc
38 file.
39
40 Global configuration like the username setting is typically put into:
41
42 • %USERPROFILE%\mercurial.ini (on Windows)
43
44 • $HOME/.hgrc (on Unix, Plan9)
45
46 The names of these files depend on the system on which Mercurial is in‐
47 stalled. *.rc files from a single directory are read in alphabetical
48 order, later ones overriding earlier ones. Where multiple paths are
49 given below, settings from earlier paths override later ones.
50
51 On Unix, the following files are consulted:
52
53 • <repo>/.hg/hgrc-not-shared (per-repository)
54
55 • <repo>/.hg/hgrc (per-repository)
56
57 • $HOME/.hgrc (per-user)
58
59 • ${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc (per-user)
60
61 • <install-root>/etc/mercurial/hgrc (per-installation)
62
63 • <install-root>/etc/mercurial/hgrc.d/*.rc (per-installation)
64
65 • /etc/mercurial/hgrc (per-system)
66
67 • /etc/mercurial/hgrc.d/*.rc (per-system)
68
69 • <internal>/*.rc (defaults)
70
71 On Windows, the following files are consulted:
72
73 • <repo>/.hg/hgrc-not-shared (per-repository)
74
75 • <repo>/.hg/hgrc (per-repository)
76
77 • %USERPROFILE%\.hgrc (per-user)
78
79 • %USERPROFILE%\Mercurial.ini (per-user)
80
81 • %HOME%\.hgrc (per-user)
82
83 • %HOME%\Mercurial.ini (per-user)
84
85 • HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial (per-system)
86
87 • <install-dir>\hgrc.d\*.rc (per-installation)
88
89 • <install-dir>\Mercurial.ini (per-installation)
90
91 • %PROGRAMDATA%\Mercurial\hgrc (per-system)
92
93 • %PROGRAMDATA%\Mercurial\Mercurial.ini (per-system)
94
95 • %PROGRAMDATA%\Mercurial\hgrc.d\*.rc (per-system)
96
97 • <internal>/*.rc (defaults)
98
99 Note The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercu‐
100 rial is used when running 32-bit Python on 64-bit Windows.
101
102 On Plan9, the following files are consulted:
103
104 • <repo>/.hg/hgrc-not-shared (per-repository)
105
106 • <repo>/.hg/hgrc (per-repository)
107
108 • $home/lib/hgrc (per-user)
109
110 • <install-root>/lib/mercurial/hgrc (per-installation)
111
112 • <install-root>/lib/mercurial/hgrc.d/*.rc (per-installation)
113
114 • /lib/mercurial/hgrc (per-system)
115
116 • /lib/mercurial/hgrc.d/*.rc (per-system)
117
118 • <internal>/*.rc (defaults)
119
120 Per-repository configuration options only apply in a particular reposi‐
121 tory. This file is not version-controlled, and will not get transferred
122 during a "clone" operation. Options in this file override options in
123 all other configuration files.
124
125 On Plan 9 and Unix, most of this file will be ignored if it doesn't be‐
126 long to a trusted user or to a trusted group. See hg help config.trust‐
127 ed for more details.
128
129 Per-user configuration file(s) are for the user running Mercurial. Op‐
130 tions in these files apply to all Mercurial commands executed by this
131 user in any directory. Options in these files override per-system and
132 per-installation options.
133
134 Per-installation configuration files are searched for in the directory
135 where Mercurial is installed. <install-root> is the parent directory of
136 the hg executable (or symlink) being run.
137
138 For example, if installed in /shared/tools/bin/hg, Mercurial will look
139 in /shared/tools/etc/mercurial/hgrc. Options in these files apply to
140 all Mercurial commands executed by any user in any directory.
141
142 Per-installation configuration files are for the system on which Mercu‐
143 rial is running. Options in these files apply to all Mercurial commands
144 executed by any user in any directory. Registry keys contain PATH-like
145 strings, every part of which must reference a Mercurial.ini file or be
146 a directory where *.rc files will be read. Mercurial checks each of
147 these locations in the specified order until one or more configuration
148 files are detected.
149
150 Per-system configuration files are for the system on which Mercurial is
151 running. Options in these files apply to all Mercurial commands exe‐
152 cuted by any user in any directory. Options in these files override
153 per-installation options.
154
155 Mercurial comes with some default configuration. The default configura‐
156 tion files are installed with Mercurial and will be overwritten on up‐
157 grades. Default configuration files should never be edited by users or
158 administrators but can be overridden in other configuration files. So
159 far the directory only contains merge tool configuration but packagers
160 can also put other default configuration there.
161
162 On versions 5.7 and later, if share-safe functionality is enabled,
163 shares will read config file of share source too.
164 <share-source/.hg/hgrc> is read before reading <repo/.hg/hgrc>.
165
166 For configs which should not be shared, <repo/.hg/hgrc-not-shared>
167 should be used.
168
170 A configuration file consists of sections, led by a [section] header
171 and followed by name = value entries (sometimes called configuration
172 keys):
173
174 [spam]
175 eggs=ham
176 green=
177 eggs
178
179 Each line contains one entry. If the lines that follow are indented,
180 they are treated as continuations of that entry. Leading whitespace is
181 removed from values. Empty lines are skipped. Lines beginning with # or
182 ; are ignored and may be used to provide comments.
183
184 Configuration keys can be set multiple times, in which case Mercurial
185 will use the value that was configured last. As an example:
186
187 [spam]
188 eggs=large
189 ham=serrano
190 eggs=small
191
192 This would set the configuration key named eggs to small.
193
194 It is also possible to define a section multiple times. A section can
195 be redefined on the same and/or on different configuration files. For
196 example:
197
198 [foo]
199 eggs=large
200 ham=serrano
201 eggs=small
202
203 [bar]
204 eggs=ham
205 green=
206 eggs
207
208 [foo]
209 ham=prosciutto
210 eggs=medium
211 bread=toasted
212
213 This would set the eggs, ham, and bread configuration keys of the foo
214 section to medium, prosciutto, and toasted, respectively. As you can
215 see there only thing that matters is the last value that was set for
216 each of the configuration keys.
217
218 If a configuration key is set multiple times in different configuration
219 files the final value will depend on the order in which the different
220 configuration files are read, with settings from earlier paths overrid‐
221 ing later ones as described on the Files section above.
222
223 A line of the form %include file will include file into the current
224 configuration file. The inclusion is recursive, which means that in‐
225 cluded files can include other files. Filenames are relative to the
226 configuration file in which the %include directive is found. Environ‐
227 ment variables and ~user constructs are expanded in file. This lets you
228 do something like:
229
230 %include ~/.hgrc.d/$HOST.rc
231
232 to include a different configuration file on each computer you use.
233
234 A line with %unset name will remove name from the current section, if
235 it has been set previously.
236
237 The values are either free-form text strings, lists of text strings, or
238 Boolean values. Boolean values can be set to true using any of "1",
239 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
240 (all case insensitive).
241
242 List values are separated by whitespace or comma, except when values
243 are placed in double quotation marks:
244
245 allow_read = "John Doe, PhD", brian, betty
246
247 Quotation marks can be escaped by prefixing them with a backslash. Only
248 quotation marks at the beginning of a word is counted as a quotation
249 (e.g., foo"bar baz is the list of foo"bar and baz).
250
252 This section describes the different sections that may appear in a Mer‐
253 curial configuration file, the purpose of each section, its possible
254 keys, and their possible values.
255
256 alias
257 Defines command aliases.
258
259 Aliases allow you to define your own commands in terms of other com‐
260 mands (or aliases), optionally including arguments. Positional argu‐
261 ments in the form of $1, $2, etc. in the alias definition are expanded
262 by Mercurial before execution. Positional arguments not already used by
263 $N in the definition are put at the end of the command to be executed.
264
265 Alias definitions consist of lines of the form:
266
267 <alias> = <command> [<argument>]...
268
269 For example, this definition:
270
271 latest = log --limit 5
272
273 creates a new command latest that shows only the five most recent
274 changesets. You can define subsequent aliases using earlier ones:
275
276 stable5 = latest -b stable
277
278 Note It is possible to create aliases with the same names as existing
279 commands, which will then override the original definitions.
280 This is almost always a bad idea!
281
282 An alias can start with an exclamation point (!) to make it a shell
283 alias. A shell alias is executed with the shell and will let you run
284 arbitrary commands. As an example,
285
286 echo = !echo $@
287
288 will let you do hg echo foo to have foo printed in your terminal. A
289 better example might be:
290
291 purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f
292
293 which will make hg purge delete all unknown files in the repository in
294 the same manner as the purge extension.
295
296 Positional arguments like $1, $2, etc. in the alias definition expand
297 to the command arguments. Unmatched arguments are removed. $0 expands
298 to the alias name and $@ expands to all arguments separated by a space.
299 "$@" (with quotes) expands to all arguments quoted individually and
300 separated by a space. These expansions happen before the command is
301 passed to the shell.
302
303 Shell aliases are executed in an environment where $HG expands to the
304 path of the Mercurial that was used to execute the alias. This is use‐
305 ful when you want to call further Mercurial commands in a shell alias,
306 as was done above for the purge alias. In addition, $HG_ARGS expands to
307 the arguments given to Mercurial. In the hg echo foo call above,
308 $HG_ARGS would expand to echo foo.
309
310 Note Some global configuration options such as -R are processed be‐
311 fore shell aliases and will thus not be passed to aliases.
312
313 annotate
314 Settings used when displaying file annotations. All values are Booleans
315 and default to False. See hg help config.diff for related options for
316 the diff command.
317
318 ignorews
319
320 Ignore white space when comparing lines.
321
322 ignorewseol
323
324 Ignore white space at the end of a line when comparing lines.
325
326 ignorewsamount
327
328 Ignore changes in the amount of white space.
329
330 ignoreblanklines
331
332 Ignore changes whose lines are all blank.
333
334 auth
335 Authentication credentials and other authentication-like configuration
336 for HTTP connections. This section allows you to store usernames and
337 passwords for use when logging into HTTP servers. See hg help con‐
338 fig.web if you want to configure who can login to your HTTP server.
339
340 The following options apply to all hosts.
341
342 cookiefile
343
344 Path to a file containing HTTP cookie lines. Cookies matching a
345 host will be sent automatically.
346
347 The file format uses the Mozilla cookies.txt format, which de‐
348 fines cookies on their own lines. Each line contains 7 fields
349 delimited by the tab character (domain, is_domain_cookie, path,
350 is_secure, expires, name, value). For more info, do an Internet
351 search for "Netscape cookies.txt format."
352
353 Note: the cookies parser does not handle port numbers on do‐
354 mains. You will need to remove ports from the domain for the
355 cookie to be recognized. This could result in a cookie being
356 disclosed to an unwanted server.
357
358 The cookies file is read-only.
359
360 Other options in this section are grouped by name and have the follow‐
361 ing format:
362
363 <name>.<argument> = <value>
364
365 where <name> is used to group arguments into authentication entries.
366 Example:
367
368 foo.prefix = hg.intevation.de/mercurial
369 foo.username = foo
370 foo.password = bar
371 foo.schemes = http https
372
373 bar.prefix = secure.example.org
374 bar.key = path/to/file.key
375 bar.cert = path/to/file.cert
376 bar.schemes = https
377
378 Supported arguments:
379
380 prefix
381
382 Either * or a URI prefix with or without the scheme part. The
383 authentication entry with the longest matching prefix is used
384 (where * matches everything and counts as a match of length 1).
385 If the prefix doesn't include a scheme, the match is performed
386 against the URI with its scheme stripped as well, and the
387 schemes argument, q.v., is then subsequently consulted.
388
389 username
390
391 Optional. Username to authenticate with. If not given, and the
392 remote site requires basic or digest authentication, the user
393 will be prompted for it. Environment variables are expanded in
394 the username letting you do foo.username = $USER. If the URI in‐
395 cludes a username, only [auth] entries with a matching username
396 or without a username will be considered.
397
398 password
399
400 Optional. Password to authenticate with. If not given, and the
401 remote site requires basic or digest authentication, the user
402 will be prompted for it.
403
404 key
405
406 Optional. PEM encoded client certificate key file. Environment
407 variables are expanded in the filename.
408
409 cert
410
411 Optional. PEM encoded client certificate chain file. Environment
412 variables are expanded in the filename.
413
414 schemes
415
416 Optional. Space separated list of URI schemes to use this au‐
417 thentication entry with. Only used if the prefix doesn't include
418 a scheme. Supported schemes are http and https. They will match
419 static-http and static-https respectively, as well. (default:
420 https)
421
422 If no suitable authentication entry is found, the user is prompted for
423 credentials as usual if required by the remote.
424
425 cmdserver
426 Controls command server settings. (ADVANCED)
427
428 message-encodings
429
430 List of encodings for the m (message) channel. The first encod‐
431 ing supported by the server will be selected and advertised in
432 the hello message. This is useful only when ui.message-output is
433 set to channel. Supported encodings are cbor.
434
435 shutdown-on-interrupt
436
437 If set to false, the server's main loop will continue running
438 after SIGINT received. runcommand requests can still be inter‐
439 rupted by SIGINT. Close the write end of the pipe to shut down
440 the server process gracefully. (default: True)
441
442 color
443 Configure the Mercurial color mode. For details about how to define
444 your custom effect and style see hg help color.
445
446 mode
447
448 String: control the method used to output color. One of auto,
449 ansi, win32, terminfo or debug. In auto mode, Mercurial will use
450 ANSI mode by default (or win32 mode prior to Windows 10) if it
451 detects a terminal. Any invalid value will disable color.
452
453 pagermode
454
455 String: optional override of color.mode used with pager.
456
457 On some systems, terminfo mode may cause problems when using
458 color with less -R as a pager program. less with the -R option
459 will only display ECMA-48 color codes, and terminfo mode may
460 sometimes emit codes that less doesn't understand. You can work
461 around this by either using ansi mode (or auto mode), or by us‐
462 ing less -r (which will pass through all terminal control codes,
463 not just color control codes).
464
465 On some systems (such as MSYS in Windows), the terminal may sup‐
466 port a different color mode than the pager program.
467
468 commands
469 commit.post-status
470
471 Show status of files in the working directory after successful
472 commit. (default: False)
473
474 merge.require-rev
475
476 Require that the revision to merge the current commit with be
477 specified on the command line. If this is enabled and a revision
478 is not specified, the command aborts. (default: False)
479
480 push.require-revs
481
482 Require revisions to push be specified using one or more mecha‐
483 nisms such as specifying them positionally on the command line,
484 using -r, -b, and/or -B on the command line, or using
485 paths.<path>:pushrev in the configuration. If this is enabled
486 and revisions are not specified, the command aborts. (default:
487 False)
488
489 resolve.confirm
490
491 Confirm before performing action if no filename is passed. (de‐
492 fault: False)
493
494 resolve.explicit-re-merge
495
496 Require uses of hg resolve to specify which action it should
497 perform, instead of re-merging files by default. (default:
498 False)
499
500 resolve.mark-check
501
502 Determines what level of checking hg resolve --mark will perform
503 before marking files as resolved. Valid values are none`,
504 ``warn, and abort. warn will output a warning listing the
505 file(s) that still have conflict markers in them, but will still
506 mark everything resolved. abort will output the same warning
507 but will not mark things as resolved. If --all is passed and
508 this is set to abort, only a warning will be shown (an error
509 will not be raised). (default: none)
510
511 status.relative
512
513 Make paths in hg status output relative to the current direc‐
514 tory. (default: False)
515
516 status.terse
517
518 Default value for the --terse flag, which condenses status out‐
519 put. (default: empty)
520
521 update.check
522
523 Determines what level of checking hg update will perform before
524 moving to a destination revision. Valid values are abort, none,
525 linear, and noconflict.
526
527 • abort always fails if the working directory has uncommitted
528 changes.
529
530 • none performs no checking, and may result in a merge with un‐
531 committed changes.
532
533 • linear allows any update as long as it follows a straight line
534 in the revision history, and may trigger a merge with uncom‐
535 mitted changes.
536
537 • noconflict will allow any update which would not trigger a
538 merge with uncommitted changes, if any are present.
539
540 (default: linear)
541
542 update.requiredest
543
544 Require that the user pass a destination when running hg update.
545 For example, hg update .:: will be allowed, but a plain hg up‐
546 date will be disallowed. (default: False)
547
548 committemplate
549 changeset
550
551 String: configuration in this section is used as the template to
552 customize the text shown in the editor when committing.
553
554 In addition to pre-defined template keywords, commit log specific one
555 below can be used for customization:
556
557 extramsg
558
559 String: Extra message (typically 'Leave message empty to abort
560 commit.'). This may be changed by some commands or extensions.
561
562 For example, the template configuration below shows as same text as one
563 shown by default:
564
565 [committemplate]
566 changeset = {desc}\n\n
567 HG: Enter commit message. Lines beginning with 'HG:' are removed.
568 HG: {extramsg}
569 HG: --
570 HG: user: {author}\n{ifeq(p2rev, "-1", "",
571 "HG: branch merge\n")
572 }HG: branch '{branch}'\n{if(activebookmark,
573 "HG: bookmark '{activebookmark}'\n") }{subrepos %
574 "HG: subrepo {subrepo}\n" }{file_adds %
575 "HG: added {file}\n" }{file_mods %
576 "HG: changed {file}\n" }{file_dels %
577 "HG: removed {file}\n" }{if(files, "",
578 "HG: no files changed\n")}
579
580 diff()
581
582 String: show the diff (see hg help templates for detail)
583
584 Sometimes it is helpful to show the diff of the changeset in the editor
585 without having to prefix 'HG: ' to each line so that highlighting works
586 correctly. For this, Mercurial provides a special string which will ig‐
587 nore everything below it:
588
589 HG: ------------------------ >8 ------------------------
590
591 For example, the template configuration below will show the diff below
592 the extra message:
593
594 [committemplate]
595 changeset = {desc}\n\n
596 HG: Enter commit message. Lines beginning with 'HG:' are removed.
597 HG: {extramsg}
598 HG: ------------------------ >8 ------------------------
599 HG: Do not touch the line above.
600 HG: Everything below will be removed.
601 {diff()}
602
603 Note For some problematic encodings (see hg help win32mbcs for de‐
604 tail), this customization should be configured carefully, to
605 avoid showing broken characters.
606
607 For example, if a multibyte character ending with backslash
608 (0x5c) is followed by the ASCII character 'n' in the customized
609 template, the sequence of backslash and 'n' is treated as
610 line-feed unexpectedly (and the multibyte character is broken,
611 too).
612
613 Customized template is used for commands below (--edit may be re‐
614 quired):
615
616 • hg backout
617
618 • hg commit
619
620 • hg fetch (for merge commit only)
621
622 • hg graft
623
624 • hg histedit
625
626 • hg import
627
628 • hg qfold, hg qnew and hg qrefresh
629
630 • hg rebase
631
632 • hg shelve
633
634 • hg sign
635
636 • hg tag
637
638 • hg transplant
639
640 Configuring items below instead of changeset allows showing customized
641 message only for specific actions, or showing different messages for
642 each action.
643
644 • changeset.backout for hg backout
645
646 • changeset.commit.amend.merge for hg commit --amend on merges
647
648 • changeset.commit.amend.normal for hg commit --amend on other
649
650 • changeset.commit.normal.merge for hg commit on merges
651
652 • changeset.commit.normal.normal for hg commit on other
653
654 • changeset.fetch for hg fetch (impling merge commit)
655
656 • changeset.gpg.sign for hg sign
657
658 • changeset.graft for hg graft
659
660 • changeset.histedit.edit for edit of hg histedit
661
662 • changeset.histedit.fold for fold of hg histedit
663
664 • changeset.histedit.mess for mess of hg histedit
665
666 • changeset.histedit.pick for pick of hg histedit
667
668 • changeset.import.bypass for hg import --bypass
669
670 • changeset.import.normal.merge for hg import on merges
671
672 • changeset.import.normal.normal for hg import on other
673
674 • changeset.mq.qnew for hg qnew
675
676 • changeset.mq.qfold for hg qfold
677
678 • changeset.mq.qrefresh for hg qrefresh
679
680 • changeset.rebase.collapse for hg rebase --collapse
681
682 • changeset.rebase.merge for hg rebase on merges
683
684 • changeset.rebase.normal for hg rebase on other
685
686 • changeset.shelve.shelve for hg shelve
687
688 • changeset.tag.add for hg tag without --remove
689
690 • changeset.tag.remove for hg tag --remove
691
692 • changeset.transplant.merge for hg transplant on merges
693
694 • changeset.transplant.normal for hg transplant on other
695
696 These dot-separated lists of names are treated as hierarchical ones.
697 For example, changeset.tag.remove customizes the commit message only
698 for hg tag --remove, but changeset.tag customizes the commit message
699 for hg tag regardless of --remove option.
700
701 When the external editor is invoked for a commit, the corresponding
702 dot-separated list of names without the changeset. prefix (e.g. com‐
703 mit.normal.normal) is in the HGEDITFORM environment variable.
704
705 In this section, items other than changeset can be referred from oth‐
706 ers. For example, the configuration to list committed files up below
707 can be referred as {listupfiles}:
708
709 [committemplate]
710 listupfiles = {file_adds %
711 "HG: added {file}\n" }{file_mods %
712 "HG: changed {file}\n" }{file_dels %
713 "HG: removed {file}\n" }{if(files, "",
714 "HG: no files changed\n")}
715
716 decode/encode
717 Filters for transforming files on checkout/checkin. This would typi‐
718 cally be used for newline processing or other localization/canonical‐
719 ization of files.
720
721 Filters consist of a filter pattern followed by a filter command. Fil‐
722 ter patterns are globs by default, rooted at the repository root. For
723 example, to match any file ending in .txt in the root directory only,
724 use the pattern *.txt. To match any file ending in .c anywhere in the
725 repository, use the pattern **.c. For each file only the first match‐
726 ing filter applies.
727
728 The filter command can start with a specifier, either pipe: or temp‐
729 file:. If no specifier is given, pipe: is used by default.
730
731 A pipe: command must accept data on stdin and return the transformed
732 data on stdout.
733
734 Pipe example:
735
736 [encode]
737 # uncompress gzip files on checkin to improve delta compression
738 # note: not necessarily a good idea, just an example
739 *.gz = pipe: gunzip
740
741 [decode]
742 # recompress gzip files when writing them to the working dir (we
743 # can safely omit "pipe:", because it's the default)
744 *.gz = gzip
745
746 A tempfile: command is a template. The string INFILE is replaced with
747 the name of a temporary file that contains the data to be filtered by
748 the command. The string OUTFILE is replaced with the name of an empty
749 temporary file, where the filtered data must be written by the command.
750
751 Note The tempfile mechanism is recommended for Windows systems, where
752 the standard shell I/O redirection operators often have strange
753 effects and may corrupt the contents of your files.
754
755 This filter mechanism is used internally by the eol extension to trans‐
756 late line ending characters between Windows (CRLF) and Unix (LF) for‐
757 mat. We suggest you use the eol extension for convenience.
758
759 defaults
760 (defaults are deprecated. Don't use them. Use aliases instead.)
761
762 Use the [defaults] section to define command defaults, i.e. the default
763 options/arguments to pass to the specified commands.
764
765 The following example makes hg log run in verbose mode, and hg status
766 show only the modified files, by default:
767
768 [defaults]
769 log = -v
770 status = -m
771
772 The actual commands, instead of their aliases, must be used when defin‐
773 ing command defaults. The command defaults will also be applied to the
774 aliases of the commands defined.
775
776 diff
777 Settings used when displaying diffs. Everything except for unified is a
778 Boolean and defaults to False. See hg help config.annotate for related
779 options for the annotate command.
780
781 git
782
783 Use git extended diff format.
784
785 nobinary
786
787 Omit git binary patches.
788
789 nodates
790
791 Don't include dates in diff headers.
792
793 noprefix
794
795 Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain
796 mode.
797
798 showfunc
799
800 Show which function each change is in.
801
802 ignorews
803
804 Ignore white space when comparing lines.
805
806 ignorewsamount
807
808 Ignore changes in the amount of white space.
809
810 ignoreblanklines
811
812 Ignore changes whose lines are all blank.
813
814 unified
815
816 Number of lines of context to show.
817
818 word-diff
819
820 Highlight changed words.
821
822 email
823 Settings for extensions that send email messages.
824
825 from
826
827 Optional. Email address to use in "From" header and SMTP enve‐
828 lope of outgoing messages.
829
830 to
831
832 Optional. Comma-separated list of recipients' email addresses.
833
834 cc
835
836 Optional. Comma-separated list of carbon copy recipients' email
837 addresses.
838
839 bcc
840
841 Optional. Comma-separated list of blind carbon copy recipients'
842 email addresses.
843
844 method
845
846 Optional. Method to use to send email messages. If value is smtp
847 (default), use SMTP (see the [smtp] section for configuration).
848 Otherwise, use as name of program to run that acts like sendmail
849 (takes -f option for sender, list of recipients on command line,
850 message on stdin). Normally, setting this to sendmail or
851 /usr/sbin/sendmail is enough to use sendmail to send messages.
852
853 charsets
854
855 Optional. Comma-separated list of character sets considered con‐
856 venient for recipients. Addresses, headers, and parts not con‐
857 taining patches of outgoing messages will be encoded in the
858 first character set to which conversion from local encoding
859 ($HGENCODING, ui.fallbackencoding) succeeds. If correct conver‐
860 sion fails, the text in question is sent as is. (default: '')
861
862 Order of outgoing email character sets:
863
864 1. us-ascii: always first, regardless of settings
865
866 2. email.charsets: in order given by user
867
868 3. ui.fallbackencoding: if not in email.charsets
869
870 4. $HGENCODING: if not in email.charsets
871
872 5. utf-8: always last, regardless of settings
873
874 Email example:
875
876 [email]
877 from = Joseph User <joe.user@example.com>
878 method = /usr/sbin/sendmail
879 # charsets for western Europeans
880 # us-ascii, utf-8 omitted, as they are tried first and last
881 charsets = iso-8859-1, iso-8859-15, windows-1252
882
883 extensions
884 Mercurial has an extension mechanism for adding new features. To enable
885 an extension, create an entry for it in this section.
886
887 If you know that the extension is already in Python's search path, you
888 can give the name of the module, followed by =, with nothing after the
889 =.
890
891 Otherwise, give a name that you choose, followed by =, followed by the
892 path to the .py file (including the file name extension) that defines
893 the extension.
894
895 To explicitly disable an extension that is enabled in an hgrc of
896 broader scope, prepend its path with !, as in foo = !/ext/path or foo =
897 ! when path is not supplied.
898
899 Example for ~/.hgrc:
900
901 [extensions]
902 # (the churn extension will get loaded from Mercurial's path)
903 churn =
904 # (this extension will get loaded from the file specified)
905 myfeature = ~/.hgext/myfeature.py
906
907 If an extension fails to load, a warning will be issued, and Mercurial
908 will proceed. To enforce that an extension must be loaded, one can set
909 the required suboption in the config:
910
911 [extensions]
912 myfeature = ~/.hgext/myfeature.py
913 myfeature:required = yes
914
915 To debug extension loading issue, one can add --traceback to their mer‐
916 curial invocation.
917
918 A default setting can we set using the special * extension key:
919
920 [extensions]
921 *:required = yes
922 myfeature = ~/.hgext/myfeature.py
923 rebase=
924
925 format
926 Configuration that controls the repository format. Newer format options
927 are more powerful, but incompatible with some older versions of Mercu‐
928 rial. Format options are considered at repository initialization only.
929 You need to make a new clone for config changes to be taken into ac‐
930 count.
931
932 For more details about repository format and version compatibility, see
933 https://www.mercurial-scm.org/wiki/MissingRequirement
934
935 usegeneraldelta
936
937 Enable or disable the "generaldelta" repository format which im‐
938 proves repository compression by allowing "revlog" to store
939 deltas against arbitrary revisions instead of the previously
940 stored one. This provides significant improvement for reposito‐
941 ries with branches.
942
943 Repositories with this on-disk format require Mercurial version
944 1.9.
945
946 Enabled by default.
947
948 dotencode
949
950 Enable or disable the "dotencode" repository format which en‐
951 hances the "fncache" repository format (which has to be enabled
952 to use dotencode) to avoid issues with filenames starting with
953 "._" on Mac OS X and spaces on Windows.
954
955 Repositories with this on-disk format require Mercurial version
956 1.7.
957
958 Enabled by default.
959
960 usefncache
961
962 Enable or disable the "fncache" repository format which enhances
963 the "store" repository format (which has to be enabled to use
964 fncache) to allow longer filenames and avoids using Windows re‐
965 served names, e.g. "nul".
966
967 Repositories with this on-disk format require Mercurial version
968 1.1.
969
970 Enabled by default.
971
972 use-dirstate-v2
973
974 Enable or disable the experimental "dirstate-v2" feature. The
975 dirstate functionality is shared by all commands interacting
976 with the working copy. The new version is more robust, faster
977 and stores more information.
978
979 The performance-improving version of this feature is currently
980 only implemented in Rust (see hg help rust), so people not using
981 a version of Mercurial compiled with the Rust parts might actu‐
982 ally suffer some slowdown. For this reason, such versions will
983 by default refuse to access repositories with "dirstate-v2" en‐
984 abled.
985
986 This behavior can be adjusted via configuration: check hg help
987 config.storage.dirstate-v2.slow-path for details.
988
989 Repositories with this on-disk format require Mercurial 6.0 or
990 above.
991
992 By default this format variant is disabled if the fast implemen‐
993 tation is not available, and enabled by default if the fast im‐
994 plementation is available.
995
996 To accomodate installations of Mercurial without the fast imple‐
997 mentation, you can downgrade your repository. To do so run the
998 following command:
999
1000 $ hg debugupgraderepo
1001 --run --config format.use-dirstate-v2=False --config
1002 storage.dirstate-v2.slow-path=allow
1003
1004 For a more comprehensive guide, see hg help inter‐
1005 nals.dirstate-v2.
1006
1007 use-dirstate-v2.automatic-upgrade-of-mismatching-repositories
1008
1009 When enabled, an automatic upgrade will be triggered when a
1010 repository format does not match its use-dirstate-v2 config.
1011
1012 This is an advanced behavior that most users will not need. We
1013 recommend you don't use this unless you are a seasoned adminis‐
1014 trator of a Mercurial install base.
1015
1016 Automatic upgrade means that any process accessing the reposi‐
1017 tory will upgrade the repository format to use dirstate-v2. This
1018 only triggers if a change is needed. This also applies to opera‐
1019 tions that would have been read-only (like hg status).
1020
1021 If the repository cannot be locked, the automatic-upgrade opera‐
1022 tion will be skipped. The next operation will attempt it again.
1023
1024 This configuration will apply for moves in any direction, either
1025 adding the dirstate-v2 format if format.use-dirstate-v2=yes or
1026 removing the dirstate-v2 requirement if for‐
1027 mat.use-dirstate-v2=no. So we recommend setting both this value
1028 and format.use-dirstate-v2 at the same time.
1029
1030 use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet
1031
1032 Hide message when performing such automatic upgrade.
1033
1034 use-dirstate-tracked-hint
1035
1036 Enable or disable the writing of "tracked key" file alongside
1037 the dirstate. (default to disabled)
1038
1039 That "tracked-hint" can help external automations to detect
1040 changes to the set of tracked files. (i.e the result of hg files
1041 or hg status -macd)
1042
1043 The tracked-hint is written in a new .hg/dirstate-tracked-hint.
1044 That file contains two lines: - the first line is the file ver‐
1045 sion (currently: 1), - the second line contains the
1046 "tracked-hint". That file is written right after the dirstate
1047 is written.
1048
1049 The tracked-hint changes whenever the set of file tracked in the
1050 dirstate changes. The general idea is: - if the hint is identi‐
1051 cal, the set of tracked file SHOULD be identical, - if the hint
1052 is different, the set of tracked file MIGHT be different.
1053
1054 The "hint is identical" case uses SHOULD as the dirstate and the
1055 hint file are two distinct files and therefore that cannot be
1056 read or written to in an atomic way. If the key is identical,
1057 nothing garantees that the dirstate is not updated right after
1058 the hint file. This is considered a negligible limitation for
1059 the intended usecase. It is actually possible to prevent this
1060 race by taking the repository lock during read operations.
1061
1062 They are two "ways" to use this feature:
1063
1064 1) monitoring changes to the .hg/dirstate-tracked-hint, if the
1065 file changes, the tracked set might have changed.
1066
1067 2. storing the value and comparing it to a later value.
1068
1069 use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories
1070
1071 When enabled, an automatic upgrade will be triggered when a
1072 repository format does not match its use-dirstate-tracked-hint
1073 config.
1074
1075 This is an advanced behavior that most users will not need. We
1076 recommend you don't use this unless you are a seasoned adminis‐
1077 trator of a Mercurial install base.
1078
1079 Automatic upgrade means that any process accessing the reposi‐
1080 tory will upgrade the repository format to use
1081 dirstate-tracked-hint. This only triggers if a change is needed.
1082 This also applies to operations that would have been read-only
1083 (like hg status).
1084
1085 If the repository cannot be locked, the automatic-upgrade opera‐
1086 tion will be skipped. The next operation will attempt it again.
1087
1088 This configuration will apply for moves in any direction, either
1089 adding the dirstate-tracked-hint format if for‐
1090 mat.use-dirstate-tracked-hint=yes or removing the
1091 dirstate-tracked-hint requirement if for‐
1092 mat.use-dirstate-tracked-hint=no. So we recommend setting both
1093 this value and format.use-dirstate-tracked-hint at the same
1094 time.
1095
1096 use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-reposito‐
1097 ries:quiet
1098
1099 Hide message when performing such automatic upgrade.
1100
1101 use-persistent-nodemap
1102
1103 Enable or disable the "persistent-nodemap" feature which im‐
1104 proves performance if the Rust extensions are available.
1105
1106 The "persistent-nodemap" persist the "node -> rev" on disk re‐
1107 moving the need to dynamically build that mapping for each Mer‐
1108 curial invocation. This significantly reduces the startup cost
1109 of various local and server-side operation for larger reposito‐
1110 ries.
1111
1112 The performance-improving version of this feature is currently
1113 only implemented in Rust (see hg help rust), so people not using
1114 a version of Mercurial compiled with the Rust parts might actu‐
1115 ally suffer some slowdown. For this reason, such versions will
1116 by default refuse to access repositories with "persis‐
1117 tent-nodemap".
1118
1119 This behavior can be adjusted via configuration: check hg help
1120 config.storage.revlog.persistent-nodemap.slow-path for details.
1121
1122 Repositories with this on-disk format require Mercurial 5.4 or
1123 above.
1124
1125 By default this format variant is disabled if the fast implemen‐
1126 tation is not available, and enabled by default if the fast im‐
1127 plementation is available.
1128
1129 To accomodate installations of Mercurial without the fast imple‐
1130 mentation, you can downgrade your repository. To do so run the
1131 following command:
1132
1133 $ hg debugupgraderepo
1134 --run --config format.use-persistent-nodemap=False --con‐
1135 fig storage.revlog.persistent-nodemap.slow-path=allow
1136
1137 use-share-safe
1138
1139 Enforce "safe" behaviors for all "shares" that access this
1140 repository.
1141
1142 With this feature, "shares" using this repository as a source
1143 will:
1144
1145 • read the source repository's configuration
1146 (<source>/.hg/hgrc).
1147
1148 • read and use the source repository's "requirements" (except
1149 the working copy specific one).
1150
1151 Without this feature, "shares" using this repository as a source
1152 will:
1153
1154 • keep tracking the repository "requirements" in the share only,
1155 ignoring the source "requirements", possibly diverging from
1156 them.
1157
1158 • ignore source repository config. This can create problems,
1159 like silently ignoring important hooks.
1160
1161 Beware that existing shares will not be upgraded/downgraded, and
1162 by default, Mercurial will refuse to interact with them until
1163 the mismatch is resolved. See hg help config.share.safe-mis‐
1164 match.source-safe and hg help config.share.safe-mis‐
1165 match.source-not-safe for details.
1166
1167 Introduced in Mercurial 5.7.
1168
1169 Enabled by default in Mercurial 6.1.
1170
1171 use-share-safe.automatic-upgrade-of-mismatching-repositories
1172
1173 When enabled, an automatic upgrade will be triggered when a
1174 repository format does not match its use-share-safe config.
1175
1176 This is an advanced behavior that most users will not need. We
1177 recommend you don't use this unless you are a seasoned adminis‐
1178 trator of a Mercurial install base.
1179
1180 Automatic upgrade means that any process accessing the reposi‐
1181 tory will upgrade the repository format to use share-safe. This
1182 only triggers if a change is needed. This also applies to opera‐
1183 tion that would have been read-only (like hg status).
1184
1185 If the repository cannot be locked, the automatic-upgrade opera‐
1186 tion will be skipped. The next operation will attempt it again.
1187
1188 This configuration will apply for moves in any direction, either
1189 adding the share-safe format if format.use-share-safe=yes or re‐
1190 moving the share-safe requirement if format.use-share-safe=no.
1191 So we recommend setting both this value and for‐
1192 mat.use-share-safe at the same time.
1193
1194 use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet
1195
1196 Hide message when performing such automatic upgrade.
1197
1198 usestore
1199
1200 Enable or disable the "store" repository format which improves
1201 compatibility with systems that fold case or otherwise mangle
1202 filenames. Disabling this option will allow you to store longer
1203 filenames in some situations at the expense of compatibility.
1204
1205 Repositories with this on-disk format require Mercurial version
1206 0.9.4.
1207
1208 Enabled by default.
1209
1210 sparse-revlog
1211
1212 Enable or disable the sparse-revlog delta strategy. This format
1213 improves delta re-use inside revlog. For very branchy reposito‐
1214 ries, it results in a smaller store. For repositories with many
1215 revisions, it also helps performance (by using shortened delta
1216 chains.)
1217
1218 Repositories with this on-disk format require Mercurial version
1219 4.7
1220
1221 Enabled by default.
1222
1223 revlog-compression
1224
1225 Compression algorithm used by revlog. Supported values are zlib
1226 and zstd. The zlib engine is the historical default of Mercu‐
1227 rial. zstd is a newer format that is usually a net win over
1228 zlib, operating faster at better compression rates. Use zstd to
1229 reduce CPU usage. Multiple values can be specified, the first
1230 available one will be used.
1231
1232 On some systems, the Mercurial installation may lack zstd sup‐
1233 port.
1234
1235 Default is zstd if available, zlib otherwise.
1236
1237 bookmarks-in-store
1238
1239 Store bookmarks in .hg/store/. This means that bookmarks are
1240 shared when using hg share regardless of the -B option.
1241
1242 Repositories with this on-disk format require Mercurial version
1243 5.1.
1244
1245 Disabled by default.
1246
1247 graph
1248 Web graph view configuration. This section let you change graph ele‐
1249 ments display properties by branches, for instance to make the default
1250 branch stand out.
1251
1252 Each line has the following format:
1253
1254 <branch>.<argument> = <value>
1255
1256 where <branch> is the name of the branch being customized. Example:
1257
1258 [graph]
1259 # 2px width
1260 default.width = 2
1261 # red color
1262 default.color = FF0000
1263
1264 Supported arguments:
1265
1266 width
1267
1268 Set branch edges width in pixels.
1269
1270 color
1271
1272 Set branch edges color in hexadecimal RGB notation.
1273
1274 hooks
1275 Commands or Python functions that get automatically executed by various
1276 actions such as starting or finishing a commit. Multiple hooks can be
1277 run for the same action by appending a suffix to the action. Overriding
1278 a site-wide hook can be done by changing its value or setting it to an
1279 empty string. Hooks can be prioritized by adding a prefix of priority.
1280 to the hook name on a new line and setting the priority. The default
1281 priority is 0.
1282
1283 Example .hg/hgrc:
1284
1285 [hooks]
1286 # update working directory after adding changesets
1287 changegroup.update = hg update
1288 # do not use the site-wide hook
1289 incoming =
1290 incoming.email = /my/email/hook
1291 incoming.autobuild = /my/build/hook
1292 # force autobuild hook to run before other incoming hooks
1293 priority.incoming.autobuild = 1
1294 ### control HGPLAIN setting when running autobuild hook
1295 # HGPLAIN always set (default from Mercurial 5.7)
1296 incoming.autobuild:run-with-plain = yes
1297 # HGPLAIN never set
1298 incoming.autobuild:run-with-plain = no
1299 # HGPLAIN inherited from environment (default before Mercurial 5.7)
1300 incoming.autobuild:run-with-plain = auto
1301
1302 Most hooks are run with environment variables set that give useful ad‐
1303 ditional information. For each hook below, the environment variables it
1304 is passed are listed with names in the form $HG_foo. The $HG_HOOKTYPE
1305 and $HG_HOOKNAME variables are set for all hooks. They contain the
1306 type of hook which triggered the run and the full name of the hook in
1307 the config, respectively. In the example above, this will be $HG_HOOK‐
1308 TYPE=incoming and $HG_HOOKNAME=incoming.email.
1309
1310 Some basic Unix syntax can be enabled for portability, including $VAR
1311 and ${VAR} style variables. A ~ followed by \ or / will be expanded to
1312 %USERPROFILE% to simulate a subset of tilde expansion on Unix. To use
1313 a literal $ or ~, it must be escaped with a back slash or inside of a
1314 strong quote. Strong quotes will be replaced by double quotes after
1315 processing.
1316
1317 This feature is enabled by adding a prefix of tonative. to the hook
1318 name on a new line, and setting it to True. For example:
1319
1320 [hooks]
1321 incoming.autobuild = /my/build/hook
1322 # enable translation to cmd.exe syntax for autobuild hook
1323 tonative.incoming.autobuild = True
1324
1325 changegroup
1326
1327 Run after a changegroup has been added via push, pull or unbun‐
1328 dle. The ID of the first new changeset is in $HG_NODE and last
1329 is in $HG_NODE_LAST. The URL from which changes came is in
1330 $HG_URL.
1331
1332 commit
1333
1334 Run after a changeset has been created in the local repository.
1335 The ID of the newly created changeset is in $HG_NODE. Parent
1336 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
1337
1338 incoming
1339
1340 Run after a changeset has been pulled, pushed, or unbundled into
1341 the local repository. The ID of the newly arrived changeset is
1342 in $HG_NODE. The URL that was source of the changes is in
1343 $HG_URL.
1344
1345 outgoing
1346
1347 Run after sending changes from the local repository to another.
1348 The ID of first changeset sent is in $HG_NODE. The source of op‐
1349 eration is in $HG_SOURCE. Also see hg help config.hooks.preout‐
1350 going.
1351
1352 post-<command>
1353
1354 Run after successful invocations of the associated command. The
1355 contents of the command line are passed as $HG_ARGS and the re‐
1356 sult code in $HG_RESULT. Parsed command line arguments are
1357 passed as $HG_PATS and $HG_OPTS. These contain string represen‐
1358 tations of the python data internally passed to <command>.
1359 $HG_OPTS is a dictionary of options (with unspecified options
1360 set to their defaults). $HG_PATS is a list of arguments. Hook
1361 failure is ignored.
1362
1363 fail-<command>
1364
1365 Run after a failed invocation of an associated command. The con‐
1366 tents of the command line are passed as $HG_ARGS. Parsed command
1367 line arguments are passed as $HG_PATS and $HG_OPTS. These con‐
1368 tain string representations of the python data internally passed
1369 to <command>. $HG_OPTS is a dictionary of options (with unspeci‐
1370 fied options set to their defaults). $HG_PATS is a list of argu‐
1371 ments. Hook failure is ignored.
1372
1373 pre-<command>
1374
1375 Run before executing the associated command. The contents of the
1376 command line are passed as $HG_ARGS. Parsed command line argu‐
1377 ments are passed as $HG_PATS and $HG_OPTS. These contain string
1378 representations of the data internally passed to <command>.
1379 $HG_OPTS is a dictionary of options (with unspecified options
1380 set to their defaults). $HG_PATS is a list of arguments. If the
1381 hook returns failure, the command doesn't execute and Mercurial
1382 returns the failure code.
1383
1384 prechangegroup
1385
1386 Run before a changegroup is added via push, pull or unbundle.
1387 Exit status 0 allows the changegroup to proceed. A non-zero sta‐
1388 tus will cause the push, pull or unbundle to fail. The URL from
1389 which changes will come is in $HG_URL.
1390
1391 precommit
1392
1393 Run before starting a local commit. Exit status 0 allows the
1394 commit to proceed. A non-zero status will cause the commit to
1395 fail. Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
1396
1397 prelistkeys
1398
1399 Run before listing pushkeys (like bookmarks) in the repository.
1400 A non-zero status will cause failure. The key namespace is in
1401 $HG_NAMESPACE.
1402
1403 preoutgoing
1404
1405 Run before collecting changes to send from the local repository
1406 to another. A non-zero status will cause failure. This lets you
1407 prevent pull over HTTP or SSH. It can also prevent propagating
1408 commits (via local pull, push (outbound) or bundle commands),
1409 but not completely, since you can just copy files instead. The
1410 source of operation is in $HG_SOURCE. If "serve", the operation
1411 is happening on behalf of a remote SSH or HTTP repository. If
1412 "push", "pull" or "bundle", the operation is happening on behalf
1413 of a repository on same system.
1414
1415 prepushkey
1416
1417 Run before a pushkey (like a bookmark) is added to the reposi‐
1418 tory. A non-zero status will cause the key to be rejected. The
1419 key namespace is in $HG_NAMESPACE, the key is in $HG_KEY, the
1420 old value (if any) is in $HG_OLD, and the new value is in
1421 $HG_NEW.
1422
1423 pretag
1424
1425 Run before creating a tag. Exit status 0 allows the tag to be
1426 created. A non-zero status will cause the tag to fail. The ID of
1427 the changeset to tag is in $HG_NODE. The name of tag is in
1428 $HG_TAG. The tag is local if $HG_LOCAL=1, or in the repository
1429 if $HG_LOCAL=0.
1430
1431 pretxnopen
1432
1433 Run before any new repository transaction is open. The reason
1434 for the transaction will be in $HG_TXNNAME, and a unique identi‐
1435 fier for the transaction will be in $HG_TXNID. A non-zero status
1436 will prevent the transaction from being opened.
1437
1438 pretxnclose
1439
1440 Run right before the transaction is actually finalized. Any
1441 repository change will be visible to the hook program. This lets
1442 you validate the transaction content or change it. Exit status 0
1443 allows the commit to proceed. A non-zero status will cause the
1444 transaction to be rolled back. The reason for the transaction
1445 opening will be in $HG_TXNNAME, and a unique identifier for the
1446 transaction will be in $HG_TXNID. The rest of the available data
1447 will vary according the transaction type. Changes unbundled to
1448 the repository will add $HG_URL and $HG_SOURCE. New changesets
1449 will add $HG_NODE (the ID of the first added changeset),
1450 $HG_NODE_LAST (the ID of the last added changeset). Bookmark
1451 and phase changes will set $HG_BOOKMARK_MOVED and
1452 $HG_PHASES_MOVED to 1 respectively. The number of new obsmark‐
1453 ers, if any, will be in $HG_NEW_OBSMARKERS, etc.
1454
1455 pretxnclose-bookmark
1456
1457 Run right before a bookmark change is actually finalized. Any
1458 repository change will be visible to the hook program. This lets
1459 you validate the transaction content or change it. Exit status 0
1460 allows the commit to proceed. A non-zero status will cause the
1461 transaction to be rolled back. The name of the bookmark will be
1462 available in $HG_BOOKMARK, the new bookmark location will be
1463 available in $HG_NODE while the previous location will be avail‐
1464 able in $HG_OLDNODE. In case of a bookmark creation $HG_OLDNODE
1465 will be empty. In case of deletion $HG_NODE will be empty. In
1466 addition, the reason for the transaction opening will be in
1467 $HG_TXNNAME, and a unique identifier for the transaction will be
1468 in $HG_TXNID.
1469
1470 pretxnclose-phase
1471
1472 Run right before a phase change is actually finalized. Any
1473 repository change will be visible to the hook program. This lets
1474 you validate the transaction content or change it. Exit status 0
1475 allows the commit to proceed. A non-zero status will cause the
1476 transaction to be rolled back. The hook is called multiple
1477 times, once for each revision affected by a phase change. The
1478 affected node is available in $HG_NODE, the phase in $HG_PHASE
1479 while the previous $HG_OLDPHASE. In case of new node, $HG_OLD‐
1480 PHASE will be empty. In addition, the reason for the transac‐
1481 tion opening will be in $HG_TXNNAME, and a unique identifier for
1482 the transaction will be in $HG_TXNID. The hook is also run for
1483 newly added revisions. In this case the $HG_OLDPHASE entry will
1484 be empty.
1485
1486 txnclose
1487
1488 Run after any repository transaction has been committed. At this
1489 point, the transaction can no longer be rolled back. The hook
1490 will run after the lock is released. See hg help con‐
1491 fig.hooks.pretxnclose for details about available variables.
1492
1493 txnclose-bookmark
1494
1495 Run after any bookmark change has been committed. At this point,
1496 the transaction can no longer be rolled back. The hook will run
1497 after the lock is released. See hg help config.hooks.pretxn‐
1498 close-bookmark for details about available variables.
1499
1500 txnclose-phase
1501
1502 Run after any phase change has been committed. At this point,
1503 the transaction can no longer be rolled back. The hook will run
1504 after the lock is released. See hg help config.hooks.pretxn‐
1505 close-phase for details about available variables.
1506
1507 txnabort
1508
1509 Run when a transaction is aborted. See hg help con‐
1510 fig.hooks.pretxnclose for details about available variables.
1511
1512 pretxnchangegroup
1513
1514 Run after a changegroup has been added via push, pull or unbun‐
1515 dle, but before the transaction has been committed. The change‐
1516 group is visible to the hook program. This allows validation of
1517 incoming changes before accepting them. The ID of the first new
1518 changeset is in $HG_NODE and last is in $HG_NODE_LAST. Exit sta‐
1519 tus 0 allows the transaction to commit. A non-zero status will
1520 cause the transaction to be rolled back, and the push, pull or
1521 unbundle will fail. The URL that was the source of changes is in
1522 $HG_URL.
1523
1524 pretxncommit
1525
1526 Run after a changeset has been created, but before the transac‐
1527 tion is committed. The changeset is visible to the hook program.
1528 This allows validation of the commit message and changes. Exit
1529 status 0 allows the commit to proceed. A non-zero status will
1530 cause the transaction to be rolled back. The ID of the new
1531 changeset is in $HG_NODE. The parent changeset IDs are in
1532 $HG_PARENT1 and $HG_PARENT2.
1533
1534 preupdate
1535
1536 Run before updating the working directory. Exit status 0 allows
1537 the update to proceed. A non-zero status will prevent the up‐
1538 date. The changeset ID of first new parent is in $HG_PARENT1.
1539 If updating to a merge, the ID of second new parent is in
1540 $HG_PARENT2.
1541
1542 listkeys
1543
1544 Run after listing pushkeys (like bookmarks) in the repository.
1545 The key namespace is in $HG_NAMESPACE. $HG_VALUES is a dictio‐
1546 nary containing the keys and values.
1547
1548 pushkey
1549
1550 Run after a pushkey (like a bookmark) is added to the reposi‐
1551 tory. The key namespace is in $HG_NAMESPACE, the key is in
1552 $HG_KEY, the old value (if any) is in $HG_OLD, and the new value
1553 is in $HG_NEW.
1554
1555 tag
1556
1557 Run after a tag is created. The ID of the tagged changeset is in
1558 $HG_NODE. The name of tag is in $HG_TAG. The tag is local if
1559 $HG_LOCAL=1, or in the repository if $HG_LOCAL=0.
1560
1561 update
1562
1563 Run after updating the working directory. The changeset ID of
1564 first new parent is in $HG_PARENT1. If updating to a merge, the
1565 ID of second new parent is in $HG_PARENT2. If the update suc‐
1566 ceeded, $HG_ERROR=0. If the update failed (e.g. because con‐
1567 flicts were not resolved), $HG_ERROR=1.
1568
1569 Note It is generally better to use standard hooks rather than the
1570 generic pre- and post- command hooks, as they are guaranteed to
1571 be called in the appropriate contexts for influencing transac‐
1572 tions. Also, hooks like "commit" will be called in all contexts
1573 that generate a commit (e.g. tag) and not just the commit com‐
1574 mand.
1575
1576 Note Environment variables with empty values may not be passed to
1577 hooks on platforms such as Windows. As an example, $HG_PARENT2
1578 will have an empty value under Unix-like platforms for non-merge
1579 changesets, while it will not be available at all under Windows.
1580
1581 The syntax for Python hooks is as follows:
1582
1583 hookname = python:modulename.submodule.callable
1584 hookname = python:/path/to/python/module.py:callable
1585
1586 Python hooks are run within the Mercurial process. Each hook is called
1587 with at least three keyword arguments: a ui object (keyword ui), a
1588 repository object (keyword repo), and a hooktype keyword that tells
1589 what kind of hook is used. Arguments listed as environment variables
1590 above are passed as keyword arguments, with no HG_ prefix, and names in
1591 lower case.
1592
1593 If a Python hook returns a "true" value or raises an exception, this is
1594 treated as a failure.
1595
1596 hostfingerprints
1597 (Deprecated. Use [hostsecurity]'s fingerprints options instead.)
1598
1599 Fingerprints of the certificates of known HTTPS servers.
1600
1601 A HTTPS connection to a server with a fingerprint configured here will
1602 only succeed if the servers certificate matches the fingerprint. This
1603 is very similar to how ssh known hosts works.
1604
1605 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
1606 Multiple values can be specified (separated by spaces or commas). This
1607 can be used to define both old and new fingerprints while a host tran‐
1608 sitions to a new certificate.
1609
1610 The CA chain and web.cacerts is not used for servers with a finger‐
1611 print.
1612
1613 For example:
1614
1615 [hostfingerprints]
1616 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1617 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1618
1619 hostsecurity
1620 Used to specify global and per-host security settings for connecting to
1621 other machines.
1622
1623 The following options control default behavior for all hosts.
1624
1625 ciphers
1626
1627 Defines the cryptographic ciphers to use for connections.
1628
1629 Value must be a valid OpenSSL Cipher List Format as documented
1630 at
1631 https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT
1632 .
1633
1634 This setting is for advanced users only. Setting to incorrect
1635 values can significantly lower connection security or decrease
1636 performance. You have been warned.
1637
1638 This option requires Python 2.7.
1639
1640 minimumprotocol
1641
1642 Defines the minimum channel encryption protocol to use.
1643
1644 By default, the highest version of TLS supported by both client
1645 and server is used.
1646
1647 Allowed values are: tls1.0, tls1.1, tls1.2.
1648
1649 When running on an old Python version, only tls1.0 is allowed
1650 since old versions of Python only support up to TLS 1.0.
1651
1652 When running a Python that supports modern TLS versions, the de‐
1653 fault is tls1.1. tls1.0 can still be used to allow TLS 1.0. How‐
1654 ever, this weakens security and should only be used as a feature
1655 of last resort if a server does not support TLS 1.1+.
1656
1657 Options in the [hostsecurity] section can have the form hostname:set‐
1658 ting. This allows multiple settings to be defined on a per-host basis.
1659
1660 The following per-host settings can be defined.
1661
1662 ciphers
1663
1664 This behaves like ciphers as described above except it only ap‐
1665 plies to the host on which it is defined.
1666
1667 fingerprints
1668
1669 A list of hashes of the DER encoded peer/remote certificate.
1670 Values have the form algorithm:fingerprint. e.g.
1671 sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2.
1672 In addition, colons (:) can appear in the fingerprint part.
1673
1674 The following algorithms/prefixes are supported: sha1, sha256,
1675 sha512.
1676
1677 Use of sha256 or sha512 is preferred.
1678
1679 If a fingerprint is specified, the CA chain is not validated for
1680 this host and Mercurial will require the remote certificate to
1681 match one of the fingerprints specified. This means if the
1682 server updates its certificate, Mercurial will abort until a new
1683 fingerprint is defined. This can provide stronger security than
1684 traditional CA-based validation at the expense of convenience.
1685
1686 This option takes precedence over verifycertsfile.
1687
1688 minimumprotocol
1689
1690 This behaves like minimumprotocol as described above except it
1691 only applies to the host on which it is defined.
1692
1693 verifycertsfile
1694
1695 Path to file a containing a list of PEM encoded certificates
1696 used to verify the server certificate. Environment variables and
1697 ~user constructs are expanded in the filename.
1698
1699 The server certificate or the certificate's certificate author‐
1700 ity (CA) must match a certificate from this file or certificate
1701 verification will fail and connections to the server will be re‐
1702 fused.
1703
1704 If defined, only certificates provided by this file will be
1705 used: web.cacerts and any system/default certificates will not
1706 be used.
1707
1708 This option has no effect if the per-host fingerprints option is
1709 set.
1710
1711 The format of the file is as follows:
1712
1713 -----BEGIN CERTIFICATE-----
1714 ... (certificate in base64 PEM encoding) ...
1715 -----END CERTIFICATE-----
1716 -----BEGIN CERTIFICATE-----
1717 ... (certificate in base64 PEM encoding) ...
1718 -----END CERTIFICATE-----
1719
1720 For example:
1721
1722 [hostsecurity]
1723 hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
1724 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
1725 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
1726 foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem
1727
1728 To change the default minimum protocol version to TLS 1.2 but to allow
1729 TLS 1.1 when connecting to hg.example.com:
1730
1731 [hostsecurity]
1732 minimumprotocol = tls1.2
1733 hg.example.com:minimumprotocol = tls1.1
1734
1735 http_proxy
1736 Used to access web-based Mercurial repositories through a HTTP proxy.
1737
1738 host
1739
1740 Host name and (optional) port of the proxy server, for example
1741 "myproxy:8000".
1742
1743 no
1744
1745 Optional. Comma-separated list of host names that should bypass
1746 the proxy.
1747
1748 passwd
1749
1750 Optional. Password to authenticate with at the proxy server.
1751
1752 user
1753
1754 Optional. User name to authenticate with at the proxy server.
1755
1756 always
1757
1758 Optional. Always use the proxy, even for localhost and any en‐
1759 tries in http_proxy.no. (default: False)
1760
1761 http
1762 Used to configure access to Mercurial repositories via HTTP.
1763
1764 timeout
1765
1766 If set, blocking operations will timeout after that many sec‐
1767 onds. (default: None)
1768
1769 merge
1770 This section specifies behavior during merges and updates.
1771
1772 checkignored
1773
1774 Controls behavior when an ignored file on disk has the same name
1775 as a tracked file in the changeset being merged or updated to,
1776 and has different contents. Options are abort, warn and ignore.
1777 With abort, abort on such files. With warn, warn on such files
1778 and back them up as .orig. With ignore, don't print a warning
1779 and back them up as .orig. (default: abort)
1780
1781 checkunknown
1782
1783 Controls behavior when an unknown file that isn't ignored has
1784 the same name as a tracked file in the changeset being merged or
1785 updated to, and has different contents. Similar to merge.check‐
1786 ignored, except for files that are not ignored. (default: abort)
1787
1788 on-failure
1789
1790 When set to continue (the default), the merge process attempts
1791 to merge all unresolved files using the merge chosen tool, re‐
1792 gardless of whether previous file merge attempts during the
1793 process succeeded or not. Setting this to prompt will prompt
1794 after any merge failure continue or halt the merge process. Set‐
1795 ting this to halt will automatically halt the merge process on
1796 any merge tool failure. The merge process can be restarted by
1797 using the resolve command. When a merge is halted, the reposi‐
1798 tory is left in a normal unresolved merge state. (default: con‐
1799 tinue)
1800
1801 strict-capability-check
1802
1803 Whether capabilities of internal merge tools are checked
1804 strictly or not, while examining rules to decide merge tool to
1805 be used. (default: False)
1806
1807 merge-patterns
1808 This section specifies merge tools to associate with particular file
1809 patterns. Tools matched here will take precedence over the default
1810 merge tool. Patterns are globs by default, rooted at the repository
1811 root.
1812
1813 Example:
1814
1815 [merge-patterns]
1816 **.c = kdiff3
1817 **.jpg = myimgmerge
1818
1819 merge-tools
1820 This section configures external merge tools to use for file-level
1821 merges. This section has likely been preconfigured at install time.
1822 Use hg config merge-tools to check the existing configuration. Also
1823 see hg help merge-tools for more details.
1824
1825 Example ~/.hgrc:
1826
1827 [merge-tools]
1828 # Override stock tool location
1829 kdiff3.executable = ~/bin/kdiff3
1830 # Specify command line
1831 kdiff3.args = $base $local $other -o $output
1832 # Give higher priority
1833 kdiff3.priority = 1
1834
1835 # Changing the priority of preconfigured tool
1836 meld.priority = 0
1837
1838 # Disable a preconfigured tool
1839 vimdiff.disabled = yes
1840
1841 # Define new tool
1842 myHtmlTool.args = -m $local $other $base $output
1843 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
1844 myHtmlTool.priority = 1
1845
1846 Supported arguments:
1847
1848 priority
1849
1850 The priority in which to evaluate this tool. (default: 0)
1851
1852 executable
1853
1854 Either just the name of the executable or its pathname.
1855
1856 On Windows, the path can use environment variables with ${Pro‐
1857 gramFiles} syntax.
1858
1859 (default: the tool name)
1860
1861 args
1862
1863 The arguments to pass to the tool executable. You can refer to
1864 the files being merged as well as the output file through these
1865 variables: $base, $local, $other, $output.
1866
1867 The meaning of $local and $other can vary depending on which ac‐
1868 tion is being performed. During an update or merge, $local rep‐
1869 resents the original state of the file, while $other represents
1870 the commit you are updating to or the commit you are merging
1871 with. During a rebase, $local represents the destination of the
1872 rebase, and $other represents the commit being rebased.
1873
1874 Some operations define custom labels to assist with identifying
1875 the revisions, accessible via $labellocal, $labelother, and $la‐
1876 belbase. If custom labels are not available, these will be lo‐
1877 cal, other, and base, respectively. (default: $local $base
1878 $other)
1879
1880 premerge
1881
1882 Attempt to run internal non-interactive 3-way merge tool before
1883 launching external tool. Options are true, false, keep,
1884 keep-merge3, or keep-mergediff (experimental). The keep option
1885 will leave markers in the file if the premerge fails. The
1886 keep-merge3 will do the same but include information about the
1887 base of the merge in the marker (see internal :merge3 in hg help
1888 merge-tools). The keep-mergediff option is similar but uses a
1889 different marker style (see internal :merge3 in hg help
1890 merge-tools). (default: True)
1891
1892 binary
1893
1894 This tool can merge binary files. (default: False, unless tool
1895 was selected by file pattern match)
1896
1897 symlink
1898
1899 This tool can merge symlinks. (default: False)
1900
1901 check
1902
1903 A list of merge success-checking options:
1904
1905 changed
1906
1907 Ask whether merge was successful when the merged file
1908 shows no changes.
1909
1910 conflicts
1911
1912 Check whether there are conflicts even though the tool
1913 reported success.
1914
1915 prompt
1916
1917 Always prompt for merge success, regardless of success
1918 reported by tool.
1919
1920 fixeol
1921
1922 Attempt to fix up EOL changes caused by the merge tool. (de‐
1923 fault: False)
1924
1925 gui
1926
1927 This tool requires a graphical interface to run. (default:
1928 False)
1929
1930 mergemarkers
1931
1932 Controls whether the labels passed via $labellocal, $labelother,
1933 and $labelbase are detailed (respecting mergemarkertemplate) or
1934 basic. If premerge is keep or keep-merge3, the conflict markers
1935 generated during premerge will be detailed if either this option
1936 or the corresponding option in the [ui] section is detailed.
1937 (default: basic)
1938
1939 mergemarkertemplate
1940
1941 This setting can be used to override mergemarker from the [com‐
1942 mand-templates] section on a per-tool basis; this applies to the
1943 $label-prefixed variables and to the conflict markers that are
1944 generated if premerge is keep` or ``keep-merge3. See the corre‐
1945 sponding variable in [ui] for more information.
1946
1947 regkey
1948
1949 Windows registry key which describes install location of this
1950 tool. Mercurial will search for this key first under HKEY_CUR‐
1951 RENT_USER and then under HKEY_LOCAL_MACHINE. (default: None)
1952
1953 regkeyalt
1954
1955 An alternate Windows registry key to try if the first key is not
1956 found. The alternate key uses the same regname and regappend
1957 semantics of the primary key. The most common use for this key
1958 is to search for 32bit applications on 64bit operating systems.
1959 (default: None)
1960
1961 regname
1962
1963 Name of value to read from specified registry key. (default:
1964 the unnamed (default) value)
1965
1966 regappend
1967
1968 String to append to the value read from the registry, typically
1969 the executable name of the tool. (default: None)
1970
1971 pager
1972 Setting used to control when to paginate and with what external tool.
1973 See hg help pager for details.
1974
1975 pager
1976
1977 Define the external tool used as pager.
1978
1979 If no pager is set, Mercurial uses the environment variable
1980 $PAGER. If neither pager.pager, nor $PAGER is set, a default
1981 pager will be used, typically less on Unix and more on Windows.
1982 Example:
1983
1984 [pager]
1985 pager = less -FRX
1986
1987 ignore
1988
1989 List of commands to disable the pager for. Example:
1990
1991 [pager]
1992 ignore = version, help, update
1993
1994 patch
1995 Settings used when applying patches, for instance through the 'import'
1996 command or with Mercurial Queues extension.
1997
1998 eol
1999
2000 When set to 'strict' patch content and patched files end of
2001 lines are preserved. When set to lf or crlf, both files end of
2002 lines are ignored when patching and the result line endings are
2003 normalized to either LF (Unix) or CRLF (Windows). When set to
2004 auto, end of lines are again ignored while patching but line
2005 endings in patched files are normalized to their original set‐
2006 ting on a per-file basis. If target file does not exist or has
2007 no end of line, patch line endings are preserved. (default:
2008 strict)
2009
2010 fuzz
2011
2012 The number of lines of 'fuzz' to allow when applying patches.
2013 This controls how much context the patcher is allowed to ignore
2014 when trying to apply a patch. (default: 2)
2015
2016 paths
2017 Assigns symbolic names and behavior to repositories.
2018
2019 Options are symbolic names defining the URL or directory that is the
2020 location of the repository. Example:
2021
2022 [paths]
2023 my_server = https://example.com/my_repo
2024 local_path = /home/me/repo
2025
2026 These symbolic names can be used from the command line. To pull from
2027 my_server: hg pull my_server. To push to local_path: hg push local_path
2028 . You can check hg help urls for details about valid URLs.
2029
2030 Options containing colons (:) denote sub-options that can influence be‐
2031 havior for that specific path. Example:
2032
2033 [paths]
2034 my_server = https://example.com/my_path
2035 my_server:pushurl = ssh://example.com/my_path
2036
2037 Paths using the path://otherpath scheme will inherit the sub-options
2038 value from the path they point to.
2039
2040 The following sub-options can be defined:
2041
2042 multi-urls
2043
2044 A boolean option. When enabled the value of the [paths] entry
2045 will be parsed as a list and the alias will resolve to multiple
2046 destination. If some of the list entry use the path:// syntax,
2047 the suboption will be inherited individually.
2048
2049 pushurl
2050
2051 The URL to use for push operations. If not defined, the location
2052 defined by the path's main entry is used.
2053
2054 pushrev
2055
2056 A revset defining which revisions to push by default.
2057
2058 When hg push is executed without a -r argument, the revset de‐
2059 fined by this sub-option is evaluated to determine what to push.
2060
2061 For example, a value of . will push the working directory's re‐
2062 vision by default.
2063
2064 Revsets specifying bookmarks will not result in the bookmark be‐
2065 ing pushed.
2066
2067 bookmarks.mode
2068
2069 How bookmark will be dealt during the exchange. It support the
2070 following value
2071
2072 • default: the default behavior, local and remote bookmarks are
2073 "merged" on push/pull.
2074
2075 • mirror: when pulling, replace local bookmarks by remote book‐
2076 marks. This is useful to replicate a repository, or as an op‐
2077 timization.
2078
2079 • ignore: ignore bookmarks during exchange. (This currently
2080 only affect pulling)
2081
2082 The following special named paths exist:
2083
2084 default
2085
2086 The URL or directory to use when no source or remote is speci‐
2087 fied.
2088
2089 hg clone will automatically define this path to the location the
2090 repository was cloned from.
2091
2092 default-push
2093
2094 (deprecated) The URL or directory for the default hg push loca‐
2095 tion. default:pushurl should be used instead.
2096
2097 phases
2098 Specifies default handling of phases. See hg help phases for more in‐
2099 formation about working with phases.
2100
2101 publish
2102
2103 Controls draft phase behavior when working as a server. When
2104 true, pushed changesets are set to public in both client and
2105 server and pulled or cloned changesets are set to public in the
2106 client. (default: True)
2107
2108 new-commit
2109
2110 Phase of newly-created commits. (default: draft)
2111
2112 checksubrepos
2113
2114 Check the phase of the current revision of each subrepository.
2115 Allowed values are "ignore", "follow" and "abort". For settings
2116 other than "ignore", the phase of the current revision of each
2117 subrepository is checked before committing the parent reposi‐
2118 tory. If any of those phases is greater than the phase of the
2119 parent repository (e.g. if a subrepo is in a "secret" phase
2120 while the parent repo is in "draft" phase), the commit is either
2121 aborted (if checksubrepos is set to "abort") or the higher phase
2122 is used for the parent repository commit (if set to "follow").
2123 (default: follow)
2124
2125 profiling
2126 Specifies profiling type, format, and file output. Two profilers are
2127 supported: an instrumenting profiler (named ls), and a sampling pro‐
2128 filer (named stat).
2129
2130 In this section description, 'profiling data' stands for the raw data
2131 collected during profiling, while 'profiling report' stands for a sta‐
2132 tistical text report generated from the profiling data.
2133
2134 enabled
2135
2136 Enable the profiler. (default: false)
2137
2138 This is equivalent to passing --profile on the command line.
2139
2140 type
2141
2142 The type of profiler to use. (default: stat)
2143
2144 ls
2145
2146 Use Python's built-in instrumenting profiler. This pro‐
2147 filer works on all platforms, but each line number it re‐
2148 ports is the first line of a function. This restriction
2149 makes it difficult to identify the expensive parts of a
2150 non-trivial function.
2151
2152 stat
2153
2154 Use a statistical profiler, statprof. This profiler is
2155 most useful for profiling commands that run for longer
2156 than about 0.1 seconds.
2157
2158 format
2159
2160 Profiling format. Specific to the ls instrumenting profiler.
2161 (default: text)
2162
2163 text
2164
2165 Generate a profiling report. When saving to a file, it
2166 should be noted that only the report is saved, and the
2167 profiling data is not kept.
2168
2169 kcachegrind
2170
2171 Format profiling data for kcachegrind use: when saving to
2172 a file, the generated file can directly be loaded into
2173 kcachegrind.
2174
2175 statformat
2176
2177 Profiling format for the stat profiler. (default: hotpath)
2178
2179 hotpath
2180
2181 Show a tree-based display containing the hot path of exe‐
2182 cution (where most time was spent).
2183
2184 bymethod
2185
2186 Show a table of methods ordered by how frequently they
2187 are active.
2188
2189 byline
2190
2191 Show a table of lines in files ordered by how frequently
2192 they are active.
2193
2194 json
2195
2196 Render profiling data as JSON.
2197
2198 freq
2199
2200 Sampling frequency. Specific to the stat sampling profiler.
2201 (default: 1000)
2202
2203 output
2204
2205 File path where profiling data or report should be saved. If the
2206 file exists, it is replaced. (default: None, data is printed on
2207 stderr)
2208
2209 sort
2210
2211 Sort field. Specific to the ls instrumenting profiler. One of
2212 callcount, reccallcount, totaltime and inlinetime. (default:
2213 inlinetime)
2214
2215 time-track
2216
2217 Control if the stat profiler track cpu or real time. (default:
2218 cpu on Windows, otherwise real)
2219
2220 limit
2221
2222 Number of lines to show. Specific to the ls instrumenting pro‐
2223 filer. (default: 30)
2224
2225 nested
2226
2227 Show at most this number of lines of drill-down info after each
2228 main entry. This can help explain the difference between Total
2229 and Inline. Specific to the ls instrumenting profiler. (de‐
2230 fault: 0)
2231
2232 showmin
2233
2234 Minimum fraction of samples an entry must have for it to be dis‐
2235 played. Can be specified as a float between 0.0 and 1.0 or can
2236 have a % afterwards to allow values up to 100. e.g. 5%.
2237
2238 Only used by the stat profiler.
2239
2240 For the hotpath format, default is 0.05. For the chrome format,
2241 default is 0.005.
2242
2243 The option is unused on other formats.
2244
2245 showmax
2246
2247 Maximum fraction of samples an entry can have before it is ig‐
2248 nored in display. Values format is the same as showmin.
2249
2250 Only used by the stat profiler.
2251
2252 For the chrome format, default is 0.999.
2253
2254 The option is unused on other formats.
2255
2256 showtime
2257
2258 Show time taken as absolute durations, in addition to percent‐
2259 ages. Only used by the hotpath format. (default: true)
2260
2261 progress
2262 Mercurial commands can draw progress bars that are as informative as
2263 possible. Some progress bars only offer indeterminate information,
2264 while others have a definite end point.
2265
2266 debug
2267
2268 Whether to print debug info when updating the progress bar. (de‐
2269 fault: False)
2270
2271 delay
2272
2273 Number of seconds (float) before showing the progress bar. (de‐
2274 fault: 3)
2275
2276 changedelay
2277
2278 Minimum delay before showing a new topic. When set to less than
2279 3 * refresh, that value will be used instead. (default: 1)
2280
2281 estimateinterval
2282
2283 Maximum sampling interval in seconds for speed and estimated
2284 time calculation. (default: 60)
2285
2286 refresh
2287
2288 Time in seconds between refreshes of the progress bar. (default:
2289 0.1)
2290
2291 format
2292
2293 Format of the progress bar.
2294
2295 Valid entries for the format field are topic, bar, number, unit,
2296 estimate, speed, and item. item defaults to the last 20 charac‐
2297 ters of the item, but this can be changed by adding either
2298 -<num> which would take the last num characters, or +<num> for
2299 the first num characters.
2300
2301 (default: topic bar number estimate)
2302
2303 width
2304
2305 If set, the maximum width of the progress information (that is,
2306 min(width, term width) will be used).
2307
2308 clear-complete
2309
2310 Clear the progress bar after it's done. (default: True)
2311
2312 disable
2313
2314 If true, don't show a progress bar.
2315
2316 assume-tty
2317
2318 If true, ALWAYS show a progress bar, unless disable is given.
2319
2320 rebase
2321 evolution.allowdivergence
2322
2323 Default to False, when True allow creating divergence when per‐
2324 forming rebase of obsolete changesets.
2325
2326 revsetalias
2327 Alias definitions for revsets. See hg help revsets for details.
2328
2329 rewrite
2330 backup-bundle
2331
2332 Whether to save stripped changesets to a bundle file. (default:
2333 True)
2334
2335 update-timestamp
2336
2337 If true, updates the date and time of the changeset to current.
2338 It is only applicable for hg amend, hg commit --amend and hg un‐
2339 commit in the current version.
2340
2341 empty-successor
2342
2343 Control what happens with empty successors that are the result of
2344 rewrite operations. If set to skip, the successor is not created. If
2345 set to keep, the empty successor is created and kept.
2346
2347 Currently, only the rebase and absorb commands consider this config‐
2348 uration. (EXPERIMENTAL)
2349
2350 rhg
2351 The pure Rust fast-path for Mercurial. See rust/README.rst in the Mer‐
2352 curial repository.
2353
2354 fallback-executable
2355
2356 Path to the executable to run in a sub-process when falling back
2357 to another implementation of Mercurial.
2358
2359 fallback-immediately
2360
2361 Fall back to fallback-executable as soon as possible, regardless
2362 of the rhg.on-unsupported configuration. Useful for debugging,
2363 for example to bypass rhg if the deault hg points to rhg.
2364
2365 Note that because this requires loading the configuration, it is
2366 possible that rhg error out before being able to fall back.
2367
2368 ignored-extensions
2369
2370 Controls which extensions should be ignored by rhg. By default,
2371 rhg triggers the rhg.on-unsupported behavior any unsupported ex‐
2372 tensions. Users can disable that behavior when they know that a
2373 given extension does not need support from rhg.
2374
2375 Expects a list of extension names, or * to ignore all exten‐
2376 sions.
2377
2378 Note: *:<suboption> is also a valid extension name for this con‐
2379 figuration option. As of this writing, the only valid "global"
2380 suboption is required.
2381
2382 on-unsupported
2383
2384 Controls the behavior of rhg when detecting unsupported fea‐
2385 tures.
2386
2387 Possible values are abort (default), abort-silent and fallback.
2388
2389 abort
2390
2391 Print an error message describing what feature is not
2392 supported, and exit with code 252
2393
2394 abort-silent
2395
2396 Silently exit with code 252
2397
2398 fallback
2399
2400 Try running the fallback executable with the same parame‐
2401 ters (and trace the fallback reason, use RUST_LOG=trace
2402 to see).
2403
2404 share
2405 safe-mismatch.source-safe
2406
2407 Controls what happens when the shared repository does not use
2408 the share-safe mechanism but its source repository does.
2409
2410 Possible values are abort (default), allow, upgrade-abort and
2411 upgrade-allow.
2412
2413 abort
2414
2415 Disallows running any command and aborts
2416
2417 allow
2418
2419 Respects the feature presence in the share source
2420
2421 upgrade-abort
2422
2423 Tries to upgrade the share to use share-safe; if it
2424 fails, aborts
2425
2426 upgrade-allow
2427
2428 Tries to upgrade the share; if it fails, continue by re‐
2429 specting the share source setting
2430
2431 Check hg help config.format.use-share-safe for details about the
2432 share-safe feature.
2433
2434 safe-mismatch.source-safe:verbose-upgrade
2435
2436 Display a message when upgrading, (default: True)
2437
2438 safe-mismatch.source-safe.warn
2439
2440 Shows a warning on operations if the shared repository does not
2441 use share-safe, but the source repository does. (default: True)
2442
2443 safe-mismatch.source-not-safe
2444
2445 Controls what happens when the shared repository uses the
2446 share-safe mechanism but its source does not.
2447
2448 Possible values are abort (default), allow, downgrade-abort and
2449 downgrade-allow.
2450
2451 abort
2452
2453 Disallows running any command and aborts
2454
2455 allow
2456
2457 Respects the feature presence in the share source
2458
2459 downgrade-abort
2460
2461 Tries to downgrade the share to not use share-safe; if it
2462 fails, aborts
2463
2464 downgrade-allow
2465
2466 Tries to downgrade the share to not use share-safe; if it
2467 fails, continue by respecting the shared source setting
2468
2469 Check hg help config.format.use-share-safe for details about the
2470 share-safe feature.
2471
2472 safe-mismatch.source-not-safe:verbose-upgrade
2473
2474 Display a message when upgrading, (default: True)
2475
2476 safe-mismatch.source-not-safe.warn
2477
2478 Shows a warning on operations if the shared repository uses
2479 share-safe, but the source repository does not. (default: True)
2480
2481 storage
2482 Control the strategy Mercurial uses internally to store history. Op‐
2483 tions in this category impact performance and repository size.
2484
2485 revlog.issue6528.fix-incoming
2486
2487 Version 5.8 of Mercurial had a bug leading to altering the par‐
2488 ent of file revision with copy information (or any other meta‐
2489 data) on exchange. This leads to the copy metadata to be over‐
2490 looked by various internal logic. The issue was fixed in Mercu‐
2491 rial 5.8.1. (See
2492 https://bz.mercurial-scm.org/show_bug.cgi?id=6528 for details)
2493
2494 As a result Mercurial is now checking and fixing incoming file
2495 revisions to make sure there parents are in the right order.
2496 This behavior can be disabled by setting this option to no. This
2497 apply to revisions added through push, pull, clone and unbundle.
2498
2499 To fix affected revisions that already exist within the reposi‐
2500 tory, one can use hg debug-repair-issue-6528.
2501
2502 revlog.optimize-delta-parent-choice
2503
2504 When storing a merge revision, both parents will be equally con‐
2505 sidered as a possible delta base. This results in better delta
2506 selection and improved revlog compression. This option is en‐
2507 abled by default.
2508
2509 Turning this option off can result in large increase of reposi‐
2510 tory size for repository with many merges.
2511
2512 revlog.persistent-nodemap.mmap
2513
2514 Whether to use the Operating System "memory mapping" feature
2515 (when possible) to access the persistent nodemap data. This im‐
2516 prove performance and reduce memory pressure.
2517
2518 Default to True.
2519
2520 For details on the "persistent-nodemap" feature, see: hg help
2521 config.format.use-persistent-nodemap.
2522
2523 revlog.persistent-nodemap.slow-path
2524
2525 Control the behavior of Merucrial when using a repository with
2526 "persistent" nodemap with an installation of Mercurial without a
2527 fast implementation for the feature:
2528
2529 allow: Silently use the slower implementation to access the
2530 repository. warn: Warn, but use the slower implementation to
2531 access the repository. abort: Prevent access to such reposito‐
2532 ries. (This is the default)
2533
2534 For details on the "persistent-nodemap" feature, see: hg help
2535 config.format.use-persistent-nodemap.
2536
2537 revlog.reuse-external-delta-parent
2538
2539 Control the order in which delta parents are considered when
2540 adding new revisions from an external source. (typically: apply
2541 bundle from hg pull or hg push).
2542
2543 New revisions are usually provided as a delta against other re‐
2544 visions. By default, Mercurial will try to reuse this delta
2545 first, therefore using the same "delta parent" as the source.
2546 Directly using delta's from the source reduces CPU usage and
2547 usually speeds up operation. However, in some case, the source
2548 might have sub-optimal delta bases and forcing their reevalua‐
2549 tion is useful. For example, pushes from an old client could
2550 have sub-optimal delta's parent that the server want to opti‐
2551 mize. (lack of general delta, bad parents, choice, lack of
2552 sparse-revlog, etc).
2553
2554 This option is enabled by default. Turning it off will ensure
2555 bad delta parent choices from older client do not propagate to
2556 this repository, at the cost of a small increase in CPU consump‐
2557 tion.
2558
2559 Note: this option only control the order in which delta parents
2560 are considered. Even when disabled, the existing delta from the
2561 source will be reused if the same delta parent is selected.
2562
2563 revlog.reuse-external-delta
2564
2565 Control the reuse of delta from external source. (typically:
2566 apply bundle from hg pull or hg push).
2567
2568 New revisions are usually provided as a delta against another
2569 revision. By default, Mercurial will not recompute the same
2570 delta again, trusting externally provided deltas. There have
2571 been rare cases of small adjustment to the diffing algorithm in
2572 the past. So in some rare case, recomputing delta provided by
2573 ancient clients can provides better results. Disabling this op‐
2574 tion means going through a full delta recomputation for all in‐
2575 coming revisions. It means a large increase in CPU usage and
2576 will slow operations down.
2577
2578 This option is enabled by default. When disabled, it also dis‐
2579 ables the related storage.revlog.reuse-external-delta-parent op‐
2580 tion.
2581
2582 revlog.zlib.level
2583
2584 Zlib compression level used when storing data into the reposi‐
2585 tory. Accepted Value range from 1 (lowest compression) to 9
2586 (highest compression). Zlib default value is 6.
2587
2588 revlog.zstd.level
2589
2590 zstd compression level used when storing data into the reposi‐
2591 tory. Accepted Value range from 1 (lowest compression) to 22
2592 (highest compression). (default 3)
2593
2594 server
2595 Controls generic server settings.
2596
2597 bookmarks-pushkey-compat
2598
2599 Trigger pushkey hook when being pushed bookmark updates. This
2600 config exist for compatibility purpose (default to True)
2601
2602 If you use pushkey and pre-pushkey hooks to control bookmark
2603 movement we recommend you migrate them to txnclose-bookmark and
2604 pretxnclose-bookmark.
2605
2606 compressionengines
2607
2608 List of compression engines and their relative priority to ad‐
2609 vertise to clients.
2610
2611 The order of compression engines determines their priority, the
2612 first having the highest priority. If a compression engine is
2613 not listed here, it won't be advertised to clients.
2614
2615 If not set (the default), built-in defaults are used. Run hg de‐
2616 buginstall to list available compression engines and their de‐
2617 fault wire protocol priority.
2618
2619 Older Mercurial clients only support zlib compression and this
2620 setting has no effect for legacy clients.
2621
2622 uncompressed
2623
2624 Whether to allow clients to clone a repository using the uncom‐
2625 pressed streaming protocol. This transfers about 40% more data
2626 than a regular clone, but uses less memory and CPU on both
2627 server and client. Over a LAN (100 Mbps or better) or a very
2628 fast WAN, an uncompressed streaming clone is a lot faster (~10x)
2629 than a regular clone. Over most WAN connections (anything slower
2630 than about 6 Mbps), uncompressed streaming is slower, because of
2631 the extra data transfer overhead. This mode will also temporar‐
2632 ily hold the write lock while determining what data to transfer.
2633 (default: True)
2634
2635 uncompressedallowsecret
2636
2637 Whether to allow stream clones when the repository contains se‐
2638 cret changesets. (default: False)
2639
2640 preferuncompressed
2641
2642 When set, clients will try to use the uncompressed streaming
2643 protocol. (default: False)
2644
2645 disablefullbundle
2646
2647 When set, servers will refuse attempts to do pull-based clones.
2648 If this option is set, preferuncompressed and/or clone bundles
2649 are highly recommended. Partial clones will still be allowed.
2650 (default: False)
2651
2652 streamunbundle
2653
2654 When set, servers will apply data sent from the client directly,
2655 otherwise it will be written to a temporary file first. This op‐
2656 tion effectively prevents concurrent pushes.
2657
2658 pullbundle
2659
2660 When set, the server will check pullbundles.manifest for bundles
2661 covering the requested heads and common nodes. The first match‐
2662 ing entry will be streamed to the client.
2663
2664 For HTTP transport, the stream will still use zlib compression
2665 for older clients.
2666
2667 concurrent-push-mode
2668
2669 Level of allowed race condition between two pushing clients.
2670
2671 • 'strict': push is abort if another client touched the reposi‐
2672 tory while the push was preparing.
2673
2674 • 'check-related': push is only aborted if it affects head that
2675 got also affected while the push was preparing. (default since
2676 5.4)
2677
2678 'check-related' only takes effect for compatible clients (ver‐
2679 sion 4.3 and later). Older clients will use 'strict'.
2680
2681 validate
2682
2683 Whether to validate the completeness of pushed changesets by
2684 checking that all new file revisions specified in manifests are
2685 present. (default: False)
2686
2687 maxhttpheaderlen
2688
2689 Instruct HTTP clients not to send request headers longer than
2690 this many bytes. (default: 1024)
2691
2692 bundle1
2693
2694 Whether to allow clients to push and pull using the legacy bun‐
2695 dle1 exchange format. (default: True)
2696
2697 bundle1gd
2698
2699 Like bundle1 but only used if the repository is using the gener‐
2700 aldelta storage format. (default: True)
2701
2702 bundle1.push
2703
2704 Whether to allow clients to push using the legacy bundle1 ex‐
2705 change format. (default: True)
2706
2707 bundle1gd.push
2708
2709 Like bundle1.push but only used if the repository is using the
2710 generaldelta storage format. (default: True)
2711
2712 bundle1.pull
2713
2714 Whether to allow clients to pull using the legacy bundle1 ex‐
2715 change format. (default: True)
2716
2717 bundle1gd.pull
2718
2719 Like bundle1.pull but only used if the repository is using the
2720 generaldelta storage format. (default: True)
2721
2722 Large repositories using the generaldelta storage format should
2723 consider setting this option because converting generaldelta
2724 repositories to the exchange format required by the bundle1 data
2725 format can consume a lot of CPU.
2726
2727 bundle2.stream
2728
2729 Whether to allow clients to pull using the bundle2 streaming
2730 protocol. (default: True)
2731
2732 zliblevel
2733
2734 Integer between -1 and 9 that controls the zlib compression
2735 level for wire protocol commands that send zlib compressed out‐
2736 put (notably the commands that send repository history data).
2737
2738 The default (-1) uses the default zlib compression level, which
2739 is likely equivalent to 6. 0 means no compression. 9 means maxi‐
2740 mum compression.
2741
2742 Setting this option allows server operators to make trade-offs
2743 between bandwidth and CPU used. Lowering the compression lowers
2744 CPU utilization but sends more bytes to clients.
2745
2746 This option only impacts the HTTP server.
2747
2748 zstdlevel
2749
2750 Integer between 1 and 22 that controls the zstd compression
2751 level for wire protocol commands. 1 is the minimal amount of
2752 compression and 22 is the highest amount of compression.
2753
2754 The default (3) should be significantly faster than zlib while
2755 likely delivering better compression ratios.
2756
2757 This option only impacts the HTTP server.
2758
2759 See also server.zliblevel.
2760
2761 view
2762
2763 Repository filter used when exchanging revisions with the peer.
2764
2765 The default view (served) excludes secret and hidden changesets.
2766 Another useful value is immutable (no draft, secret or hidden
2767 changesets). (EXPERIMENTAL)
2768
2769 smtp
2770 Configuration for extensions that need to send email messages.
2771
2772 host
2773
2774 Host name of mail server, e.g. "mail.example.com".
2775
2776 port
2777
2778 Optional. Port to connect to on mail server. (default: 465 if
2779 tls is smtps; 25 otherwise)
2780
2781 tls
2782
2783 Optional. Method to enable TLS when connecting to mail server:
2784 starttls, smtps or none. (default: none)
2785
2786 username
2787
2788 Optional. User name for authenticating with the SMTP server.
2789 (default: None)
2790
2791 password
2792
2793 Optional. Password for authenticating with the SMTP server. If
2794 not specified, interactive sessions will prompt the user for a
2795 password; non-interactive sessions will fail. (default: None)
2796
2797 local_hostname
2798
2799 Optional. The hostname that the sender can use to identify it‐
2800 self to the MTA.
2801
2802 subpaths
2803 Subrepository source URLs can go stale if a remote server changes name
2804 or becomes temporarily unavailable. This section lets you define re‐
2805 write rules of the form:
2806
2807 <pattern> = <replacement>
2808
2809 where pattern is a regular expression matching a subrepository source
2810 URL and replacement is the replacement string used to rewrite it.
2811 Groups can be matched in pattern and referenced in replacements. For
2812 instance:
2813
2814 http://server/(.*)-hg/ = http://hg.server/\1/
2815
2816 rewrites http://server/foo-hg/ into http://hg.server/foo/.
2817
2818 Relative subrepository paths are first made absolute, and the rewrite
2819 rules are then applied on the full (absolute) path. If pattern doesn't
2820 match the full path, an attempt is made to apply it on the relative
2821 path alone. The rules are applied in definition order.
2822
2823 subrepos
2824 This section contains options that control the behavior of the sub‐
2825 repositories feature. See also hg help subrepos.
2826
2827 Security note: auditing in Mercurial is known to be insufficient to
2828 prevent clone-time code execution with carefully constructed Git subre‐
2829 pos. It is unknown if a similar detect is present in Subversion subre‐
2830 pos. Both Git and Subversion subrepos are disabled by default out of
2831 security concerns. These subrepo types can be enabled using the respec‐
2832 tive options below.
2833
2834 allowed
2835
2836 Whether subrepositories are allowed in the working directory.
2837
2838 When false, commands involving subrepositories (like hg update)
2839 will fail for all subrepository types. (default: true)
2840
2841 hg:allowed
2842
2843 Whether Mercurial subrepositories are allowed in the working di‐
2844 rectory. This option only has an effect if subrepos.allowed is
2845 true. (default: true)
2846
2847 git:allowed
2848
2849 Whether Git subrepositories are allowed in the working direc‐
2850 tory. This option only has an effect if subrepos.allowed is
2851 true.
2852
2853 See the security note above before enabling Git subrepos. (de‐
2854 fault: false)
2855
2856 svn:allowed
2857
2858 Whether Subversion subrepositories are allowed in the working
2859 directory. This option only has an effect if subrepos.allowed is
2860 true.
2861
2862 See the security note above before enabling Subversion subrepos.
2863 (default: false)
2864
2865 templatealias
2866 Alias definitions for templates. See hg help templates for details.
2867
2868 templates
2869 Use the [templates] section to define template strings. See hg help
2870 templates for details.
2871
2872 trusted
2873 Mercurial will not use the settings in the .hg/hgrc file from a reposi‐
2874 tory if it doesn't belong to a trusted user or to a trusted group, as
2875 various hgrc features allow arbitrary commands to be run. This issue is
2876 often encountered when configuring hooks or extensions for shared
2877 repositories or servers. However, the web interface will use some safe
2878 settings from the [web] section.
2879
2880 This section specifies what users and groups are trusted. The current
2881 user is always trusted. To trust everybody, list a user or a group with
2882 name *. These settings must be placed in an already-trusted file to
2883 take effect, such as $HOME/.hgrc of the user or service running Mercu‐
2884 rial.
2885
2886 users
2887
2888 Comma-separated list of trusted users.
2889
2890 groups
2891
2892 Comma-separated list of trusted groups.
2893
2894 ui
2895 User interface controls.
2896
2897 archivemeta
2898
2899 Whether to include the .hg_archival.txt file containing meta
2900 data (hashes for the repository base and for tip) in archives
2901 created by the hg archive command or downloaded via hgweb. (de‐
2902 fault: True)
2903
2904 askusername
2905
2906 Whether to prompt for a username when committing. If True, and
2907 neither $HGUSER nor $EMAIL has been specified, then the user
2908 will be prompted to enter a username. If no username is entered,
2909 the default USER@HOST is used instead. (default: False)
2910
2911 clonebundles
2912
2913 Whether the "clone bundles" feature is enabled.
2914
2915 When enabled, hg clone may download and apply a server-adver‐
2916 tised bundle file from a URL instead of using the normal ex‐
2917 change mechanism.
2918
2919 This can likely result in faster and more reliable clones.
2920
2921 (default: True)
2922
2923 clonebundlefallback
2924
2925 Whether failure to apply an advertised "clone bundle" from a
2926 server should result in fallback to a regular clone.
2927
2928 This is disabled by default because servers advertising "clone
2929 bundles" often do so to reduce server load. If advertised bun‐
2930 dles start mass failing and clients automatically fall back to a
2931 regular clone, this would add significant and unexpected load to
2932 the server since the server is expecting clone operations to be
2933 offloaded to pre-generated bundles. Failing fast (the default
2934 behavior) ensures clients don't overwhelm the server when "clone
2935 bundle" application fails.
2936
2937 (default: False)
2938
2939 clonebundleprefers
2940
2941 Defines preferences for which "clone bundles" to use.
2942
2943 Servers advertising "clone bundles" may advertise multiple
2944 available bundles. Each bundle may have different attributes,
2945 such as the bundle type and compression format. This option is
2946 used to prefer a particular bundle over another.
2947
2948 The following keys are defined by Mercurial:
2949
2950 BUNDLESPEC
2951 A bundle type specifier. These are strings passed to hg
2952 bundle -t. e.g. gzip-v2 or bzip2-v1.
2953
2954 COMPRESSION
2955 The compression format of the bundle. e.g. gzip and
2956 bzip2.
2957
2958 Server operators may define custom keys.
2959
2960 Example values: COMPRESSION=bzip2, BUNDLESPEC=gzip-v2, COMPRES‐
2961 SION=gzip.
2962
2963 By default, the first bundle advertised by the server is used.
2964
2965 color
2966
2967 When to colorize output. Possible value are Boolean ("yes" or
2968 "no"), or "debug", or "always". (default: "yes"). "yes" will use
2969 color whenever it seems possible. See hg help color for details.
2970
2971 commitsubrepos
2972
2973 Whether to commit modified subrepositories when committing the
2974 parent repository. If False and one subrepository has uncommit‐
2975 ted changes, abort the commit. (default: False)
2976
2977 debug
2978
2979 Print debugging information. (default: False)
2980
2981 editor
2982
2983 The editor to use during a commit. (default: $EDITOR or vi)
2984
2985 fallbackencoding
2986
2987 Encoding to try if it's not possible to decode the changelog us‐
2988 ing UTF-8. (default: ISO-8859-1)
2989
2990 graphnodetemplate
2991
2992 (DEPRECATED) Use command-templates.graphnode instead.
2993
2994 ignore
2995
2996 A file to read per-user ignore patterns from. This file should
2997 be in the same format as a repository-wide .hgignore file. File‐
2998 names are relative to the repository root. This option supports
2999 hook syntax, so if you want to specify multiple ignore files,
3000 you can do so by setting something like ignore.other = ~/.hgig‐
3001 nore2. For details of the ignore file format, see the hgig‐
3002 nore(5) man page.
3003
3004 interactive
3005
3006 Allow to prompt the user. (default: True)
3007
3008 interface
3009
3010 Select the default interface for interactive features (default:
3011 text). Possible values are 'text' and 'curses'.
3012
3013 interface.chunkselector
3014
3015 Select the interface for change recording (e.g. hg commit -i).
3016 Possible values are 'text' and 'curses'. This config overrides
3017 the interface specified by ui.interface.
3018
3019 large-file-limit
3020
3021 Largest file size that gives no memory use warning. Possible
3022 values are integers or 0 to disable the check. Value is ex‐
3023 pressed in bytes by default, one can use standard units for con‐
3024 venience (e.g. 10MB, 0.1GB, etc) (default: 10MB)
3025
3026 logtemplate
3027
3028 (DEPRECATED) Use command-templates.log instead.
3029
3030 merge
3031
3032 The conflict resolution program to use during a manual merge.
3033 For more information on merge tools see hg help merge-tools.
3034 For configuring merge tools see the [merge-tools] section.
3035
3036 mergemarkers
3037
3038 Sets the merge conflict marker label styling. The detailed style
3039 uses the command-templates.mergemarker setting to style the la‐
3040 bels. The basic style just uses 'local' and 'other' as the
3041 marker label. One of basic or detailed. (default: basic)
3042
3043 mergemarkertemplate
3044
3045 (DEPRECATED) Use command-templates.mergemarker instead.
3046
3047 message-output
3048
3049 Where to write status and error messages. (default: stdio)
3050
3051 channel
3052
3053 Use separate channel for structured output. (Com‐
3054 mand-server only)
3055
3056 stderr
3057
3058 Everything to stderr.
3059
3060 stdio
3061
3062 Status to stdout, and error to stderr.
3063
3064 origbackuppath
3065
3066 The path to a directory used to store generated .orig files. If
3067 the path is not a directory, one will be created. If set, files
3068 stored in this directory have the same name as the original file
3069 and do not have a .orig suffix.
3070
3071 paginate
3072
3073 Control the pagination of command output (default: True). See hg
3074 help pager for details.
3075
3076 patch
3077
3078 An optional external tool that hg import and some extensions
3079 will use for applying patches. By default Mercurial uses an in‐
3080 ternal patch utility. The external tool must work as the common
3081 Unix patch program. In particular, it must accept a -p argument
3082 to strip patch headers, a -d argument to specify the current di‐
3083 rectory, a file name to patch, and a patch file to take from
3084 stdin.
3085
3086 It is possible to specify a patch tool together with extra argu‐
3087 ments. For example, setting this option to patch --merge will
3088 use the patch program with its 2-way merge option.
3089
3090 portablefilenames
3091
3092 Check for portable filenames. Can be warn, ignore or abort.
3093 (default: warn)
3094
3095 warn
3096
3097 Print a warning message on POSIX platforms, if a file
3098 with a non-portable filename is added (e.g. a file with a
3099 name that can't be created on Windows because it contains
3100 reserved parts like AUX, reserved characters like :, or
3101 would cause a case collision with an existing file).
3102
3103 ignore
3104
3105 Don't print a warning.
3106
3107 abort
3108
3109 The command is aborted.
3110
3111 true
3112
3113 Alias for warn.
3114
3115 false
3116
3117 Alias for ignore.
3118
3119 On Windows, this configuration option is ignored and the command
3120 aborted.
3121
3122 pre-merge-tool-output-template
3123
3124 (DEPRECATED) Use command-template.pre-merge-tool-output instead.
3125
3126 quiet
3127
3128 Reduce the amount of output printed. (default: False)
3129
3130 relative-paths
3131
3132 Prefer relative paths in the UI.
3133
3134 remotecmd
3135
3136 Remote command to use for clone/push/pull operations. (default:
3137 hg)
3138
3139 report_untrusted
3140
3141 Warn if a .hg/hgrc file is ignored due to not being owned by a
3142 trusted user or group. (default: True)
3143
3144 slash
3145
3146 (Deprecated. Use slashpath template filter instead.)
3147
3148 Display paths using a slash (/) as the path separator. This only
3149 makes a difference on systems where the default path separator
3150 is not the slash character (e.g. Windows uses the backslash
3151 character (\)). (default: False)
3152
3153 statuscopies
3154
3155 Display copies in the status command.
3156
3157 ssh
3158
3159 Command to use for SSH connections. (default: ssh)
3160
3161 ssherrorhint
3162
3163 A hint shown to the user in the case of SSH error (e.g. Please
3164 see http://company/internalwiki/ssh.html)
3165
3166 strict
3167
3168 Require exact command names, instead of allowing unambiguous ab‐
3169 breviations. (default: False)
3170
3171 style
3172
3173 Name of style to use for command output.
3174
3175 supportcontact
3176
3177 A URL where users should report a Mercurial traceback. Use this
3178 if you are a large organisation with its own Mercurial deploy‐
3179 ment process and crash reports should be addressed to your in‐
3180 ternal support.
3181
3182 textwidth
3183
3184 Maximum width of help text. A longer line generated by hg help
3185 or hg subcommand --help will be broken after white space to get
3186 this width or the terminal width, whichever comes first. A
3187 non-positive value will disable this and the terminal width will
3188 be used. (default: 78)
3189
3190 timeout
3191
3192 The timeout used when a lock is held (in seconds), a negative
3193 value means no timeout. (default: 600)
3194
3195 timeout.warn
3196
3197 Time (in seconds) before a warning is printed about held lock. A
3198 negative value means no warning. (default: 0)
3199
3200 traceback
3201
3202 Mercurial always prints a traceback when an unknown exception
3203 occurs. Setting this to True will make Mercurial print a trace‐
3204 back on all exceptions, even those recognized by Mercurial (such
3205 as IOError or MemoryError). (default: False)
3206
3207 tweakdefaults
3208
3209 By default Mercurial's behavior changes very little from release to
3210 release, but over time the recommended config settings shift. Enable
3211 this config to opt in to get automatic tweaks to Mercurial's behav‐
3212 ior over time. This config setting will have no effect if HGPLAIN is
3213 set or HGPLAINEXCEPT is set and does not include tweakdefaults. (de‐
3214 fault: False)
3215
3216 It currently means:
3217
3218 [ui]
3219 # The rollback command is dangerous. As a rule, don't use it.
3220 rollback = False
3221 # Make `hg status` report copy information
3222 statuscopies = yes
3223 # Prefer curses UIs when available. Revert to plain-text with `text`.
3224 interface = curses
3225 # Make compatible commands emit cwd-relative paths by default.
3226 relative-paths = yes
3227
3228 [commands]
3229 # Grep working directory by default.
3230 grep.all-files = True
3231 # Refuse to perform an `hg update` that would cause a file content merge
3232 update.check = noconflict
3233 # Show conflicts information in `hg status`
3234 status.verbose = True
3235 # Make `hg resolve` with no action (like `-m`) fail instead of re-merging.
3236 resolve.explicit-re-merge = True
3237
3238 [diff]
3239 git = 1
3240 showfunc = 1
3241 word-diff = 1
3242
3243 username
3244
3245 The committer of a changeset created when running "commit".
3246 Typically a person's name and email address, e.g. Fred Widget
3247 <fred@example.com>. Environment variables in the username are
3248 expanded.
3249
3250 (default: $EMAIL or username@hostname. If the username in hgrc
3251 is empty, e.g. if the system admin set username = in the system
3252 hgrc, it has to be specified manually or in a different hgrc
3253 file)
3254
3255 verbose
3256
3257 Increase the amount of output printed. (default: False)
3258
3259 command-templates
3260 Templates used for customizing the output of commands.
3261
3262 graphnode
3263
3264 The template used to print changeset nodes in an ASCII revision
3265 graph. (default: {graphnode})
3266
3267 log
3268
3269 Template string for commands that print changesets.
3270
3271 mergemarker
3272
3273 The template used to print the commit description next to each
3274 conflict marker during merge conflicts. See hg help templates
3275 for the template format.
3276
3277 Defaults to showing the hash, tags, branches, bookmarks, author,
3278 and the first line of the commit description.
3279
3280 If you use non-ASCII characters in names for tags, branches,
3281 bookmarks, authors, and/or commit descriptions, you must pay at‐
3282 tention to encodings of managed files. At template expansion,
3283 non-ASCII characters use the encoding specified by the --encod‐
3284 ing global option, HGENCODING or other environment variables
3285 that govern your locale. If the encoding of the merge markers is
3286 different from the encoding of the merged files, serious prob‐
3287 lems may occur.
3288
3289 Can be overridden per-merge-tool, see the [merge-tools] section.
3290
3291 oneline-summary
3292
3293 A template used by hg rebase and other commands for showing a
3294 one-line summary of a commit. If the template configured here is
3295 longer than one line, then only the first line is used.
3296
3297 The template can be overridden per command by defining a tem‐
3298 plate in oneline-summary.<command>, where <command> can be e.g.
3299 "rebase".
3300
3301 pre-merge-tool-output
3302
3303 A template that is printed before executing an external merge
3304 tool. This can be used to print out additional context that
3305 might be useful to have during the conflict resolution, such as
3306 the description of the various commits involved or book‐
3307 marks/tags.
3308
3309 Additional information is available in the local`, ``base, and
3310 other dicts. For example: {local.label}, {base.name}, or
3311 {other.islink}.
3312
3313 web
3314 Web interface configuration. The settings in this section apply to both
3315 the builtin webserver (started by hg serve) and the script you run
3316 through a webserver (hgweb.cgi and the derivatives for FastCGI and
3317 WSGI).
3318
3319 The Mercurial webserver does no authentication (it does not prompt for
3320 usernames and passwords to validate who users are), but it does do au‐
3321 thorization (it grants or denies access for authenticated users based
3322 on settings in this section). You must either configure your webserver
3323 to do authentication for you, or disable the authorization checks.
3324
3325 For a quick setup in a trusted environment, e.g., a private LAN, where
3326 you want it to accept pushes from anybody, you can use the following
3327 command line:
3328
3329 $ hg --config web.allow-push=* --config web.push_ssl=False serve
3330
3331 Note that this will allow anybody to push anything to the server and
3332 that this should not be used for public servers.
3333
3334 The full set of options is:
3335
3336 accesslog
3337
3338 Where to output the access log. (default: stdout)
3339
3340 address
3341
3342 Interface address to bind to. (default: all)
3343
3344 allow-archive
3345
3346 List of archive format (bz2, gz, zip) allowed for downloading.
3347 (default: empty)
3348
3349 allowbz2
3350
3351 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
3352 revisions. (default: False)
3353
3354 allowgz
3355
3356 (DEPRECATED) Whether to allow .tar.gz downloading of repository
3357 revisions. (default: False)
3358
3359 allow-pull
3360
3361 Whether to allow pulling from the repository. (default: True)
3362
3363 allow-push
3364
3365 Whether to allow pushing to the repository. If empty or not set,
3366 pushing is not allowed. If the special value *, any remote user
3367 can push, including unauthenticated users. Otherwise, the remote
3368 user must have been authenticated, and the authenticated user
3369 name must be present in this list. The contents of the al‐
3370 low-push list are examined after the deny_push list.
3371
3372 allow_read
3373
3374 If the user has not already been denied repository access due to
3375 the contents of deny_read, this list determines whether to grant
3376 repository access to the user. If this list is not empty, and
3377 the user is unauthenticated or not present in the list, then ac‐
3378 cess is denied for the user. If the list is empty or not set,
3379 then access is permitted to all users by default. Setting al‐
3380 low_read to the special value * is equivalent to it not being
3381 set (i.e. access is permitted to all users). The contents of the
3382 allow_read list are examined after the deny_read list.
3383
3384 allowzip
3385
3386 (DEPRECATED) Whether to allow .zip downloading of repository re‐
3387 visions. This feature creates temporary files. (default: False)
3388
3389 archivesubrepos
3390
3391 Whether to recurse into subrepositories when archiving. (de‐
3392 fault: False)
3393
3394 baseurl
3395
3396 Base URL to use when publishing URLs in other locations, so
3397 third-party tools like email notification hooks can construct
3398 URLs. Example: http://hgserver/repos/.
3399
3400 cacerts
3401
3402 Path to file containing a list of PEM encoded certificate au‐
3403 thority certificates. Environment variables and ~user constructs
3404 are expanded in the filename. If specified on the client, then
3405 it will verify the identity of remote HTTPS servers with these
3406 certificates.
3407
3408 To disable SSL verification temporarily, specify --insecure from
3409 command line.
3410
3411 You can use OpenSSL's CA certificate file if your platform has
3412 one. On most Linux systems this will be /etc/ssl/certs/ca-cer‐
3413 tificates.crt. Otherwise you will have to generate this file
3414 manually. The form must be as follows:
3415
3416 -----BEGIN CERTIFICATE-----
3417 ... (certificate in base64 PEM encoding) ...
3418 -----END CERTIFICATE-----
3419 -----BEGIN CERTIFICATE-----
3420 ... (certificate in base64 PEM encoding) ...
3421 -----END CERTIFICATE-----
3422
3423 cache
3424
3425 Whether to support caching in hgweb. (default: True)
3426
3427 certificate
3428
3429 Certificate to use when running hg serve.
3430
3431 collapse
3432
3433 With descend enabled, repositories in subdirectories are shown
3434 at a single level alongside repositories in the current path.
3435 With collapse also enabled, repositories residing at a deeper
3436 level than the current path are grouped behind navigable direc‐
3437 tory entries that lead to the locations of these repositories.
3438 In effect, this setting collapses each collection of reposito‐
3439 ries found within a subdirectory into a single entry for that
3440 subdirectory. (default: False)
3441
3442 comparisoncontext
3443
3444 Number of lines of context to show in side-by-side file compari‐
3445 son. If negative or the value full, whole files are shown. (de‐
3446 fault: 5)
3447
3448 This setting can be overridden by a context request parameter to
3449 the comparison command, taking the same values.
3450
3451 contact
3452
3453 Name or email address of the person in charge of the repository.
3454 (default: ui.username or $EMAIL or "unknown" if unset or empty)
3455
3456 csp
3457
3458 Send a Content-Security-Policy HTTP header with this value.
3459
3460 The value may contain a special string %nonce%, which will be
3461 replaced by a randomly-generated one-time use value. If the
3462 value contains %nonce%, web.cache will be disabled, as caching
3463 undermines the one-time property of the nonce. This nonce will
3464 also be inserted into <script> elements containing inline Java‐
3465 Script.
3466
3467 Note: lots of HTML content sent by the server is derived from
3468 repository data. Please consider the potential for malicious
3469 repository data to "inject" itself into generated HTML content
3470 as part of your security threat model.
3471
3472 deny_push
3473
3474 Whether to deny pushing to the repository. If empty or not set,
3475 push is not denied. If the special value *, all remote users are
3476 denied push. Otherwise, unauthenticated users are all denied,
3477 and any authenticated user name present in this list is also de‐
3478 nied. The contents of the deny_push list are examined before the
3479 allow-push list.
3480
3481 deny_read
3482
3483 Whether to deny reading/viewing of the repository. If this list
3484 is not empty, unauthenticated users are all denied, and any au‐
3485 thenticated user name present in this list is also denied access
3486 to the repository. If set to the special value *, all remote
3487 users are denied access (rarely needed ;). If deny_read is empty
3488 or not set, the determination of repository access depends on
3489 the presence and content of the allow_read list (see descrip‐
3490 tion). If both deny_read and allow_read are empty or not set,
3491 then access is permitted to all users by default. If the reposi‐
3492 tory is being served via hgwebdir, denied users will not be able
3493 to see it in the list of repositories. The contents of the
3494 deny_read list have priority over (are examined before) the con‐
3495 tents of the allow_read list.
3496
3497 descend
3498
3499 hgwebdir indexes will not descend into subdirectories. Only
3500 repositories directly in the current path will be shown (other
3501 repositories are still available from the index corresponding to
3502 their containing path).
3503
3504 description
3505
3506 Textual description of the repository's purpose or contents.
3507 (default: "unknown")
3508
3509 encoding
3510
3511 Character encoding name. (default: the current locale charset)
3512 Example: "UTF-8".
3513
3514 errorlog
3515
3516 Where to output the error log. (default: stderr)
3517
3518 guessmime
3519
3520 Control MIME types for raw download of file content. Set to
3521 True to let hgweb guess the content type from the file exten‐
3522 sion. This will serve HTML files as text/html and might allow
3523 cross-site scripting attacks when serving untrusted reposito‐
3524 ries. (default: False)
3525
3526 hidden
3527
3528 Whether to hide the repository in the hgwebdir index. (default:
3529 False)
3530
3531 ipv6
3532
3533 Whether to use IPv6. (default: False)
3534
3535 labels
3536
3537 List of string labels associated with the repository.
3538
3539 Labels are exposed as a template keyword and can be used to cus‐
3540 tomize output. e.g. the index template can group or filter
3541 repositories by labels and the summary template can display ad‐
3542 ditional content if a specific label is present.
3543
3544 logoimg
3545
3546 File name of the logo image that some templates display on each
3547 page. The file name is relative to staticurl. That is, the full
3548 path to the logo image is "staticurl/logoimg". If unset, hgl‐
3549 ogo.png will be used.
3550
3551 logourl
3552
3553 Base URL to use for logos. If unset, https://mercurial-scm.org/
3554 will be used.
3555
3556 maxchanges
3557
3558 Maximum number of changes to list on the changelog. (default:
3559 10)
3560
3561 maxfiles
3562
3563 Maximum number of files to list per changeset. (default: 10)
3564
3565 maxshortchanges
3566
3567 Maximum number of changes to list on the shortlog, graph or
3568 filelog pages. (default: 60)
3569
3570 name
3571
3572 Repository name to use in the web interface. (default: current
3573 working directory)
3574
3575 port
3576
3577 Port to listen on. (default: 8000)
3578
3579 prefix
3580
3581 Prefix path to serve from. (default: '' (server root))
3582
3583 push_ssl
3584
3585 Whether to require that inbound pushes be transported over SSL
3586 to prevent password sniffing. (default: True)
3587
3588 refreshinterval
3589
3590 How frequently directory listings re-scan the filesystem for new
3591 repositories, in seconds. This is relevant when wildcards are
3592 used to define paths. Depending on how much filesystem traversal
3593 is required, refreshing may negatively impact performance.
3594
3595 Values less than or equal to 0 always refresh. (default: 20)
3596
3597 server-header
3598
3599 Value for HTTP Server response header.
3600
3601 static
3602
3603 Directory where static files are served from.
3604
3605 staticurl
3606
3607 Base URL to use for static files. If unset, static files (e.g.
3608 the hgicon.png favicon) will be served by the CGI script itself.
3609 Use this setting to serve them directly with the HTTP server.
3610 Example: http://hgserver/static/.
3611
3612 stripes
3613
3614 How many lines a "zebra stripe" should span in multi-line out‐
3615 put. Set to 0 to disable. (default: 1)
3616
3617 style
3618
3619 Which template map style to use. The available options are the
3620 names of subdirectories in the HTML templates path. (default:
3621 paper) Example: monoblue.
3622
3623 templates
3624
3625 Where to find the HTML templates. The default path to the HTML
3626 templates can be obtained from hg debuginstall.
3627
3628 websub
3629 Web substitution filter definition. You can use this section to define
3630 a set of regular expression substitution patterns which let you auto‐
3631 matically modify the hgweb server output.
3632
3633 The default hgweb templates only apply these substitution patterns on
3634 the revision description fields. You can apply them anywhere you want
3635 when you create your own templates by adding calls to the "websub" fil‐
3636 ter (usually after calling the "escape" filter).
3637
3638 This can be used, for example, to convert issue references to links to
3639 your issue tracker, or to convert "markdown-like" syntax into HTML (see
3640 the examples below).
3641
3642 Each entry in this section names a substitution filter. The value of
3643 each entry defines the substitution expression itself. The websub ex‐
3644 pressions follow the old interhg extension syntax, which in turn imi‐
3645 tates the Unix sed replacement syntax:
3646
3647 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
3648
3649 You can use any separator other than "/". The final "i" is optional and
3650 indicates that the search must be case insensitive.
3651
3652 Examples:
3653
3654 [websub]
3655 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
3656 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
3657 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
3658
3659 worker
3660 Parallel master/worker configuration. We currently perform working di‐
3661 rectory updates in parallel on Unix-like systems, which greatly helps
3662 performance.
3663
3664 enabled
3665
3666 Whether to enable workers code to be used. (default: true)
3667
3668 numcpus
3669
3670 Number of CPUs to use for parallel operations. A zero or nega‐
3671 tive value is treated as use the default. (default: 4 or the
3672 number of CPUs on the system, whichever is larger)
3673
3674 backgroundclose
3675
3676 Whether to enable closing file handles on background threads
3677 during certain operations. Some platforms aren't very efficient
3678 at closing file handles that have been written or appended to.
3679 By performing file closing on background threads, file write
3680 rate can increase substantially. (default: true on Windows,
3681 false elsewhere)
3682
3683 backgroundcloseminfilecount
3684
3685 Minimum number of files required to trigger background file
3686 closing. Operations not writing this many files won't start
3687 background close threads. (default: 2048)
3688
3689 backgroundclosemaxqueue
3690
3691 The maximum number of opened file handles waiting to be closed
3692 in the background. This option only has an effect if background‐
3693 close is enabled. (default: 384)
3694
3695 backgroundclosethreadcount
3696
3697 Number of threads to process background file closes. Only rele‐
3698 vant if backgroundclose is enabled. (default: 4)
3699
3701 Bryan O'Sullivan <bos@serpentine.com>.
3702
3703 Mercurial was written by Olivia Mackall <olivia@selenic.com>.
3704
3706 hg(1), hgignore(5)
3707
3709 This manual page is copyright 2005 Bryan O'Sullivan. Mercurial is
3710 copyright 2005-2023 Olivia Mackall. Free use of this software is
3711 granted under the terms of the GNU General Public License version 2 or
3712 any later version.
3713
3715 Bryan O'Sullivan <bos@serpentine.com>
3716
3717 Organization: Mercurial
3718
3719
3720
3721
3722 HGRC(5)