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-tracked-hint
1008
1009 Enable or disable the writing of "tracked key" file alongside
1010 the dirstate. (default to disabled)
1011
1012 That "tracked-hint" can help external automations to detect
1013 changes to the set of tracked files. (i.e the result of hg files
1014 or hg status -macd)
1015
1016 The tracked-hint is written in a new .hg/dirstate-tracked-hint.
1017 That file contains two lines: - the first line is the file ver‐
1018 sion (currently: 1), - the second line contains the
1019 "tracked-hint". That file is written right after the dirstate
1020 is written.
1021
1022 The tracked-hint changes whenever the set of file tracked in the
1023 dirstate changes. The general idea is: - if the hint is identi‐
1024 cal, the set of tracked file SHOULD be identical, - if the hint
1025 is different, the set of tracked file MIGHT be different.
1026
1027 The "hint is identical" case uses SHOULD as the dirstate and the
1028 hint file are two distinct files and therefore that cannot be
1029 read or written to in an atomic way. If the key is identical,
1030 nothing garantees that the dirstate is not updated right after
1031 the hint file. This is considered a negligible limitation for
1032 the intended usecase. It is actually possible to prevent this
1033 race by taking the repository lock during read operations.
1034
1035 They are two "ways" to use this feature:
1036
1037 1) monitoring changes to the .hg/dirstate-tracked-hint, if the
1038 file changes, the tracked set might have changed.
1039
1040 2. storing the value and comparing it to a later value.
1041
1042 use-persistent-nodemap
1043
1044 Enable or disable the "persistent-nodemap" feature which im‐
1045 proves performance if the Rust extensions are available.
1046
1047 The "persistent-nodemap" persist the "node -> rev" on disk re‐
1048 moving the need to dynamically build that mapping for each Mer‐
1049 curial invocation. This significantly reduces the startup cost
1050 of various local and server-side operation for larger reposito‐
1051 ries.
1052
1053 The performance-improving version of this feature is currently
1054 only implemented in Rust (see hg help rust), so people not using
1055 a version of Mercurial compiled with the Rust parts might actu‐
1056 ally suffer some slowdown. For this reason, such versions will
1057 by default refuse to access repositories with "persis‐
1058 tent-nodemap".
1059
1060 This behavior can be adjusted via configuration: check hg help
1061 config.storage.revlog.persistent-nodemap.slow-path for details.
1062
1063 Repositories with this on-disk format require Mercurial 5.4 or
1064 above.
1065
1066 By default this format variant is disabled if the fast implemen‐
1067 tation is not available, and enabled by default if the fast im‐
1068 plementation is available.
1069
1070 To accomodate installations of Mercurial without the fast imple‐
1071 mentation, you can downgrade your repository. To do so run the
1072 following command:
1073
1074 $ hg debugupgraderepo
1075 --run --config format.use-persistent-nodemap=False --con‐
1076 fig storage.revlog.persistent-nodemap.slow-path=allow
1077
1078 use-share-safe
1079
1080 Enforce "safe" behaviors for all "shares" that access this
1081 repository.
1082
1083 With this feature, "shares" using this repository as a source
1084 will:
1085
1086 • read the source repository's configuration
1087 (<source>/.hg/hgrc).
1088
1089 • read and use the source repository's "requirements" (except
1090 the working copy specific one).
1091
1092 Without this feature, "shares" using this repository as a source
1093 will:
1094
1095 • keep tracking the repository "requirements" in the share only,
1096 ignoring the source "requirements", possibly diverging from
1097 them.
1098
1099 • ignore source repository config. This can create problems,
1100 like silently ignoring important hooks.
1101
1102 Beware that existing shares will not be upgraded/downgraded, and
1103 by default, Mercurial will refuse to interact with them until
1104 the mismatch is resolved. See hg help config.share.safe-mis‐
1105 match.source-safe and hg help config.share.safe-mis‐
1106 match.source-not-safe for details.
1107
1108 Introduced in Mercurial 5.7.
1109
1110 Enabled by default in Mercurial 6.1.
1111
1112 usestore
1113
1114 Enable or disable the "store" repository format which improves
1115 compatibility with systems that fold case or otherwise mangle
1116 filenames. Disabling this option will allow you to store longer
1117 filenames in some situations at the expense of compatibility.
1118
1119 Repositories with this on-disk format require Mercurial version
1120 0.9.4.
1121
1122 Enabled by default.
1123
1124 sparse-revlog
1125
1126 Enable or disable the sparse-revlog delta strategy. This format
1127 improves delta re-use inside revlog. For very branchy reposito‐
1128 ries, it results in a smaller store. For repositories with many
1129 revisions, it also helps performance (by using shortened delta
1130 chains.)
1131
1132 Repositories with this on-disk format require Mercurial version
1133 4.7
1134
1135 Enabled by default.
1136
1137 revlog-compression
1138
1139 Compression algorithm used by revlog. Supported values are zlib
1140 and zstd. The zlib engine is the historical default of Mercu‐
1141 rial. zstd is a newer format that is usually a net win over
1142 zlib, operating faster at better compression rates. Use zstd to
1143 reduce CPU usage. Multiple values can be specified, the first
1144 available one will be used.
1145
1146 On some systems, the Mercurial installation may lack zstd sup‐
1147 port.
1148
1149 Default is zstd if available, zlib otherwise.
1150
1151 bookmarks-in-store
1152
1153 Store bookmarks in .hg/store/. This means that bookmarks are
1154 shared when using hg share regardless of the -B option.
1155
1156 Repositories with this on-disk format require Mercurial version
1157 5.1.
1158
1159 Disabled by default.
1160
1161 graph
1162 Web graph view configuration. This section let you change graph ele‐
1163 ments display properties by branches, for instance to make the default
1164 branch stand out.
1165
1166 Each line has the following format:
1167
1168 <branch>.<argument> = <value>
1169
1170 where <branch> is the name of the branch being customized. Example:
1171
1172 [graph]
1173 # 2px width
1174 default.width = 2
1175 # red color
1176 default.color = FF0000
1177
1178 Supported arguments:
1179
1180 width
1181
1182 Set branch edges width in pixels.
1183
1184 color
1185
1186 Set branch edges color in hexadecimal RGB notation.
1187
1188 hooks
1189 Commands or Python functions that get automatically executed by various
1190 actions such as starting or finishing a commit. Multiple hooks can be
1191 run for the same action by appending a suffix to the action. Overriding
1192 a site-wide hook can be done by changing its value or setting it to an
1193 empty string. Hooks can be prioritized by adding a prefix of priority.
1194 to the hook name on a new line and setting the priority. The default
1195 priority is 0.
1196
1197 Example .hg/hgrc:
1198
1199 [hooks]
1200 # update working directory after adding changesets
1201 changegroup.update = hg update
1202 # do not use the site-wide hook
1203 incoming =
1204 incoming.email = /my/email/hook
1205 incoming.autobuild = /my/build/hook
1206 # force autobuild hook to run before other incoming hooks
1207 priority.incoming.autobuild = 1
1208 ### control HGPLAIN setting when running autobuild hook
1209 # HGPLAIN always set (default from Mercurial 5.7)
1210 incoming.autobuild:run-with-plain = yes
1211 # HGPLAIN never set
1212 incoming.autobuild:run-with-plain = no
1213 # HGPLAIN inherited from environment (default before Mercurial 5.7)
1214 incoming.autobuild:run-with-plain = auto
1215
1216 Most hooks are run with environment variables set that give useful ad‐
1217 ditional information. For each hook below, the environment variables it
1218 is passed are listed with names in the form $HG_foo. The $HG_HOOKTYPE
1219 and $HG_HOOKNAME variables are set for all hooks. They contain the
1220 type of hook which triggered the run and the full name of the hook in
1221 the config, respectively. In the example above, this will be $HG_HOOK‐
1222 TYPE=incoming and $HG_HOOKNAME=incoming.email.
1223
1224 Some basic Unix syntax can be enabled for portability, including $VAR
1225 and ${VAR} style variables. A ~ followed by \ or / will be expanded to
1226 %USERPROFILE% to simulate a subset of tilde expansion on Unix. To use
1227 a literal $ or ~, it must be escaped with a back slash or inside of a
1228 strong quote. Strong quotes will be replaced by double quotes after
1229 processing.
1230
1231 This feature is enabled by adding a prefix of tonative. to the hook
1232 name on a new line, and setting it to True. For example:
1233
1234 [hooks]
1235 incoming.autobuild = /my/build/hook
1236 # enable translation to cmd.exe syntax for autobuild hook
1237 tonative.incoming.autobuild = True
1238
1239 changegroup
1240
1241 Run after a changegroup has been added via push, pull or unbun‐
1242 dle. The ID of the first new changeset is in $HG_NODE and last
1243 is in $HG_NODE_LAST. The URL from which changes came is in
1244 $HG_URL.
1245
1246 commit
1247
1248 Run after a changeset has been created in the local repository.
1249 The ID of the newly created changeset is in $HG_NODE. Parent
1250 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
1251
1252 incoming
1253
1254 Run after a changeset has been pulled, pushed, or unbundled into
1255 the local repository. The ID of the newly arrived changeset is
1256 in $HG_NODE. The URL that was source of the changes is in
1257 $HG_URL.
1258
1259 outgoing
1260
1261 Run after sending changes from the local repository to another.
1262 The ID of first changeset sent is in $HG_NODE. The source of op‐
1263 eration is in $HG_SOURCE. Also see hg help config.hooks.preout‐
1264 going.
1265
1266 post-<command>
1267
1268 Run after successful invocations of the associated command. The
1269 contents of the command line are passed as $HG_ARGS and the re‐
1270 sult code in $HG_RESULT. Parsed command line arguments are
1271 passed as $HG_PATS and $HG_OPTS. These contain string represen‐
1272 tations of the python data internally passed to <command>.
1273 $HG_OPTS is a dictionary of options (with unspecified options
1274 set to their defaults). $HG_PATS is a list of arguments. Hook
1275 failure is ignored.
1276
1277 fail-<command>
1278
1279 Run after a failed invocation of an associated command. The con‐
1280 tents of the command line are passed as $HG_ARGS. Parsed command
1281 line arguments are passed as $HG_PATS and $HG_OPTS. These con‐
1282 tain string representations of the python data internally passed
1283 to <command>. $HG_OPTS is a dictionary of options (with unspeci‐
1284 fied options set to their defaults). $HG_PATS is a list of argu‐
1285 ments. Hook failure is ignored.
1286
1287 pre-<command>
1288
1289 Run before executing the associated command. The contents of the
1290 command line are passed as $HG_ARGS. Parsed command line argu‐
1291 ments are passed as $HG_PATS and $HG_OPTS. These contain string
1292 representations of the data internally passed to <command>.
1293 $HG_OPTS is a dictionary of options (with unspecified options
1294 set to their defaults). $HG_PATS is a list of arguments. If the
1295 hook returns failure, the command doesn't execute and Mercurial
1296 returns the failure code.
1297
1298 prechangegroup
1299
1300 Run before a changegroup is added via push, pull or unbundle.
1301 Exit status 0 allows the changegroup to proceed. A non-zero sta‐
1302 tus will cause the push, pull or unbundle to fail. The URL from
1303 which changes will come is in $HG_URL.
1304
1305 precommit
1306
1307 Run before starting a local commit. Exit status 0 allows the
1308 commit to proceed. A non-zero status will cause the commit to
1309 fail. Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
1310
1311 prelistkeys
1312
1313 Run before listing pushkeys (like bookmarks) in the repository.
1314 A non-zero status will cause failure. The key namespace is in
1315 $HG_NAMESPACE.
1316
1317 preoutgoing
1318
1319 Run before collecting changes to send from the local repository
1320 to another. A non-zero status will cause failure. This lets you
1321 prevent pull over HTTP or SSH. It can also prevent propagating
1322 commits (via local pull, push (outbound) or bundle commands),
1323 but not completely, since you can just copy files instead. The
1324 source of operation is in $HG_SOURCE. If "serve", the operation
1325 is happening on behalf of a remote SSH or HTTP repository. If
1326 "push", "pull" or "bundle", the operation is happening on behalf
1327 of a repository on same system.
1328
1329 prepushkey
1330
1331 Run before a pushkey (like a bookmark) is added to the reposi‐
1332 tory. A non-zero status will cause the key to be rejected. The
1333 key namespace is in $HG_NAMESPACE, the key is in $HG_KEY, the
1334 old value (if any) is in $HG_OLD, and the new value is in
1335 $HG_NEW.
1336
1337 pretag
1338
1339 Run before creating a tag. Exit status 0 allows the tag to be
1340 created. A non-zero status will cause the tag to fail. The ID of
1341 the changeset to tag is in $HG_NODE. The name of tag is in
1342 $HG_TAG. The tag is local if $HG_LOCAL=1, or in the repository
1343 if $HG_LOCAL=0.
1344
1345 pretxnopen
1346
1347 Run before any new repository transaction is open. The reason
1348 for the transaction will be in $HG_TXNNAME, and a unique identi‐
1349 fier for the transaction will be in $HG_TXNID. A non-zero status
1350 will prevent the transaction from being opened.
1351
1352 pretxnclose
1353
1354 Run right before the transaction is actually finalized. Any
1355 repository change will be visible to the hook program. This lets
1356 you validate the transaction content or change it. Exit status 0
1357 allows the commit to proceed. A non-zero status will cause the
1358 transaction to be rolled back. The reason for the transaction
1359 opening will be in $HG_TXNNAME, and a unique identifier for the
1360 transaction will be in $HG_TXNID. The rest of the available data
1361 will vary according the transaction type. Changes unbundled to
1362 the repository will add $HG_URL and $HG_SOURCE. New changesets
1363 will add $HG_NODE (the ID of the first added changeset),
1364 $HG_NODE_LAST (the ID of the last added changeset). Bookmark
1365 and phase changes will set $HG_BOOKMARK_MOVED and
1366 $HG_PHASES_MOVED to 1 respectively. The number of new obsmark‐
1367 ers, if any, will be in $HG_NEW_OBSMARKERS, etc.
1368
1369 pretxnclose-bookmark
1370
1371 Run right before a bookmark change is actually finalized. Any
1372 repository change will be visible to the hook program. This lets
1373 you validate the transaction content or change it. Exit status 0
1374 allows the commit to proceed. A non-zero status will cause the
1375 transaction to be rolled back. The name of the bookmark will be
1376 available in $HG_BOOKMARK, the new bookmark location will be
1377 available in $HG_NODE while the previous location will be avail‐
1378 able in $HG_OLDNODE. In case of a bookmark creation $HG_OLDNODE
1379 will be empty. In case of deletion $HG_NODE will be empty. In
1380 addition, the reason for the transaction opening will be in
1381 $HG_TXNNAME, and a unique identifier for the transaction will be
1382 in $HG_TXNID.
1383
1384 pretxnclose-phase
1385
1386 Run right before a phase change is actually finalized. Any
1387 repository change will be visible to the hook program. This lets
1388 you validate the transaction content or change it. Exit status 0
1389 allows the commit to proceed. A non-zero status will cause the
1390 transaction to be rolled back. The hook is called multiple
1391 times, once for each revision affected by a phase change. The
1392 affected node is available in $HG_NODE, the phase in $HG_PHASE
1393 while the previous $HG_OLDPHASE. In case of new node, $HG_OLD‐
1394 PHASE will be empty. In addition, the reason for the transac‐
1395 tion opening will be in $HG_TXNNAME, and a unique identifier for
1396 the transaction will be in $HG_TXNID. The hook is also run for
1397 newly added revisions. In this case the $HG_OLDPHASE entry will
1398 be empty.
1399
1400 txnclose
1401
1402 Run after any repository transaction has been committed. At this
1403 point, the transaction can no longer be rolled back. The hook
1404 will run after the lock is released. See hg help con‐
1405 fig.hooks.pretxnclose for details about available variables.
1406
1407 txnclose-bookmark
1408
1409 Run after any bookmark change has been committed. At this point,
1410 the transaction can no longer be rolled back. The hook will run
1411 after the lock is released. See hg help config.hooks.pretxn‐
1412 close-bookmark for details about available variables.
1413
1414 txnclose-phase
1415
1416 Run after any phase change has been committed. At this point,
1417 the transaction can no longer be rolled back. The hook will run
1418 after the lock is released. See hg help config.hooks.pretxn‐
1419 close-phase for details about available variables.
1420
1421 txnabort
1422
1423 Run when a transaction is aborted. See hg help con‐
1424 fig.hooks.pretxnclose for details about available variables.
1425
1426 pretxnchangegroup
1427
1428 Run after a changegroup has been added via push, pull or unbun‐
1429 dle, but before the transaction has been committed. The change‐
1430 group is visible to the hook program. This allows validation of
1431 incoming changes before accepting them. The ID of the first new
1432 changeset is in $HG_NODE and last is in $HG_NODE_LAST. Exit sta‐
1433 tus 0 allows the transaction to commit. A non-zero status will
1434 cause the transaction to be rolled back, and the push, pull or
1435 unbundle will fail. The URL that was the source of changes is in
1436 $HG_URL.
1437
1438 pretxncommit
1439
1440 Run after a changeset has been created, but before the transac‐
1441 tion is committed. The changeset is visible to the hook program.
1442 This allows validation of the commit message and changes. Exit
1443 status 0 allows the commit to proceed. A non-zero status will
1444 cause the transaction to be rolled back. The ID of the new
1445 changeset is in $HG_NODE. The parent changeset IDs are in
1446 $HG_PARENT1 and $HG_PARENT2.
1447
1448 preupdate
1449
1450 Run before updating the working directory. Exit status 0 allows
1451 the update to proceed. A non-zero status will prevent the up‐
1452 date. The changeset ID of first new parent is in $HG_PARENT1.
1453 If updating to a merge, the ID of second new parent is in
1454 $HG_PARENT2.
1455
1456 listkeys
1457
1458 Run after listing pushkeys (like bookmarks) in the repository.
1459 The key namespace is in $HG_NAMESPACE. $HG_VALUES is a dictio‐
1460 nary containing the keys and values.
1461
1462 pushkey
1463
1464 Run after a pushkey (like a bookmark) is added to the reposi‐
1465 tory. The key namespace is in $HG_NAMESPACE, the key is in
1466 $HG_KEY, the old value (if any) is in $HG_OLD, and the new value
1467 is in $HG_NEW.
1468
1469 tag
1470
1471 Run after a tag is created. The ID of the tagged changeset is in
1472 $HG_NODE. The name of tag is in $HG_TAG. The tag is local if
1473 $HG_LOCAL=1, or in the repository if $HG_LOCAL=0.
1474
1475 update
1476
1477 Run after updating the working directory. The changeset ID of
1478 first new parent is in $HG_PARENT1. If updating to a merge, the
1479 ID of second new parent is in $HG_PARENT2. If the update suc‐
1480 ceeded, $HG_ERROR=0. If the update failed (e.g. because con‐
1481 flicts were not resolved), $HG_ERROR=1.
1482
1483 Note It is generally better to use standard hooks rather than the
1484 generic pre- and post- command hooks, as they are guaranteed to
1485 be called in the appropriate contexts for influencing transac‐
1486 tions. Also, hooks like "commit" will be called in all contexts
1487 that generate a commit (e.g. tag) and not just the commit com‐
1488 mand.
1489
1490 Note Environment variables with empty values may not be passed to
1491 hooks on platforms such as Windows. As an example, $HG_PARENT2
1492 will have an empty value under Unix-like platforms for non-merge
1493 changesets, while it will not be available at all under Windows.
1494
1495 The syntax for Python hooks is as follows:
1496
1497 hookname = python:modulename.submodule.callable
1498 hookname = python:/path/to/python/module.py:callable
1499
1500 Python hooks are run within the Mercurial process. Each hook is called
1501 with at least three keyword arguments: a ui object (keyword ui), a
1502 repository object (keyword repo), and a hooktype keyword that tells
1503 what kind of hook is used. Arguments listed as environment variables
1504 above are passed as keyword arguments, with no HG_ prefix, and names in
1505 lower case.
1506
1507 If a Python hook returns a "true" value or raises an exception, this is
1508 treated as a failure.
1509
1510 hostfingerprints
1511 (Deprecated. Use [hostsecurity]'s fingerprints options instead.)
1512
1513 Fingerprints of the certificates of known HTTPS servers.
1514
1515 A HTTPS connection to a server with a fingerprint configured here will
1516 only succeed if the servers certificate matches the fingerprint. This
1517 is very similar to how ssh known hosts works.
1518
1519 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
1520 Multiple values can be specified (separated by spaces or commas). This
1521 can be used to define both old and new fingerprints while a host tran‐
1522 sitions to a new certificate.
1523
1524 The CA chain and web.cacerts is not used for servers with a finger‐
1525 print.
1526
1527 For example:
1528
1529 [hostfingerprints]
1530 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1531 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1532
1533 hostsecurity
1534 Used to specify global and per-host security settings for connecting to
1535 other machines.
1536
1537 The following options control default behavior for all hosts.
1538
1539 ciphers
1540
1541 Defines the cryptographic ciphers to use for connections.
1542
1543 Value must be a valid OpenSSL Cipher List Format as documented
1544 at
1545 https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT
1546 .
1547
1548 This setting is for advanced users only. Setting to incorrect
1549 values can significantly lower connection security or decrease
1550 performance. You have been warned.
1551
1552 This option requires Python 2.7.
1553
1554 minimumprotocol
1555
1556 Defines the minimum channel encryption protocol to use.
1557
1558 By default, the highest version of TLS supported by both client
1559 and server is used.
1560
1561 Allowed values are: tls1.0, tls1.1, tls1.2.
1562
1563 When running on an old Python version, only tls1.0 is allowed
1564 since old versions of Python only support up to TLS 1.0.
1565
1566 When running a Python that supports modern TLS versions, the de‐
1567 fault is tls1.1. tls1.0 can still be used to allow TLS 1.0. How‐
1568 ever, this weakens security and should only be used as a feature
1569 of last resort if a server does not support TLS 1.1+.
1570
1571 Options in the [hostsecurity] section can have the form hostname:set‐
1572 ting. This allows multiple settings to be defined on a per-host basis.
1573
1574 The following per-host settings can be defined.
1575
1576 ciphers
1577
1578 This behaves like ciphers as described above except it only ap‐
1579 plies to the host on which it is defined.
1580
1581 fingerprints
1582
1583 A list of hashes of the DER encoded peer/remote certificate.
1584 Values have the form algorithm:fingerprint. e.g.
1585 sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2.
1586 In addition, colons (:) can appear in the fingerprint part.
1587
1588 The following algorithms/prefixes are supported: sha1, sha256,
1589 sha512.
1590
1591 Use of sha256 or sha512 is preferred.
1592
1593 If a fingerprint is specified, the CA chain is not validated for
1594 this host and Mercurial will require the remote certificate to
1595 match one of the fingerprints specified. This means if the
1596 server updates its certificate, Mercurial will abort until a new
1597 fingerprint is defined. This can provide stronger security than
1598 traditional CA-based validation at the expense of convenience.
1599
1600 This option takes precedence over verifycertsfile.
1601
1602 minimumprotocol
1603
1604 This behaves like minimumprotocol as described above except it
1605 only applies to the host on which it is defined.
1606
1607 verifycertsfile
1608
1609 Path to file a containing a list of PEM encoded certificates
1610 used to verify the server certificate. Environment variables and
1611 ~user constructs are expanded in the filename.
1612
1613 The server certificate or the certificate's certificate author‐
1614 ity (CA) must match a certificate from this file or certificate
1615 verification will fail and connections to the server will be re‐
1616 fused.
1617
1618 If defined, only certificates provided by this file will be
1619 used: web.cacerts and any system/default certificates will not
1620 be used.
1621
1622 This option has no effect if the per-host fingerprints option is
1623 set.
1624
1625 The format of the file is as follows:
1626
1627 -----BEGIN CERTIFICATE-----
1628 ... (certificate in base64 PEM encoding) ...
1629 -----END CERTIFICATE-----
1630 -----BEGIN CERTIFICATE-----
1631 ... (certificate in base64 PEM encoding) ...
1632 -----END CERTIFICATE-----
1633
1634 For example:
1635
1636 [hostsecurity]
1637 hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
1638 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
1639 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
1640 foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem
1641
1642 To change the default minimum protocol version to TLS 1.2 but to allow
1643 TLS 1.1 when connecting to hg.example.com:
1644
1645 [hostsecurity]
1646 minimumprotocol = tls1.2
1647 hg.example.com:minimumprotocol = tls1.1
1648
1649 http_proxy
1650 Used to access web-based Mercurial repositories through a HTTP proxy.
1651
1652 host
1653
1654 Host name and (optional) port of the proxy server, for example
1655 "myproxy:8000".
1656
1657 no
1658
1659 Optional. Comma-separated list of host names that should bypass
1660 the proxy.
1661
1662 passwd
1663
1664 Optional. Password to authenticate with at the proxy server.
1665
1666 user
1667
1668 Optional. User name to authenticate with at the proxy server.
1669
1670 always
1671
1672 Optional. Always use the proxy, even for localhost and any en‐
1673 tries in http_proxy.no. (default: False)
1674
1675 http
1676 Used to configure access to Mercurial repositories via HTTP.
1677
1678 timeout
1679
1680 If set, blocking operations will timeout after that many sec‐
1681 onds. (default: None)
1682
1683 merge
1684 This section specifies behavior during merges and updates.
1685
1686 checkignored
1687
1688 Controls behavior when an ignored file on disk has the same name
1689 as a tracked file in the changeset being merged or updated to,
1690 and has different contents. Options are abort, warn and ignore.
1691 With abort, abort on such files. With warn, warn on such files
1692 and back them up as .orig. With ignore, don't print a warning
1693 and back them up as .orig. (default: abort)
1694
1695 checkunknown
1696
1697 Controls behavior when an unknown file that isn't ignored has
1698 the same name as a tracked file in the changeset being merged or
1699 updated to, and has different contents. Similar to merge.check‐
1700 ignored, except for files that are not ignored. (default: abort)
1701
1702 on-failure
1703
1704 When set to continue (the default), the merge process attempts
1705 to merge all unresolved files using the merge chosen tool, re‐
1706 gardless of whether previous file merge attempts during the
1707 process succeeded or not. Setting this to prompt will prompt
1708 after any merge failure continue or halt the merge process. Set‐
1709 ting this to halt will automatically halt the merge process on
1710 any merge tool failure. The merge process can be restarted by
1711 using the resolve command. When a merge is halted, the reposi‐
1712 tory is left in a normal unresolved merge state. (default: con‐
1713 tinue)
1714
1715 strict-capability-check
1716
1717 Whether capabilities of internal merge tools are checked
1718 strictly or not, while examining rules to decide merge tool to
1719 be used. (default: False)
1720
1721 merge-patterns
1722 This section specifies merge tools to associate with particular file
1723 patterns. Tools matched here will take precedence over the default
1724 merge tool. Patterns are globs by default, rooted at the repository
1725 root.
1726
1727 Example:
1728
1729 [merge-patterns]
1730 **.c = kdiff3
1731 **.jpg = myimgmerge
1732
1733 merge-tools
1734 This section configures external merge tools to use for file-level
1735 merges. This section has likely been preconfigured at install time.
1736 Use hg config merge-tools to check the existing configuration. Also
1737 see hg help merge-tools for more details.
1738
1739 Example ~/.hgrc:
1740
1741 [merge-tools]
1742 # Override stock tool location
1743 kdiff3.executable = ~/bin/kdiff3
1744 # Specify command line
1745 kdiff3.args = $base $local $other -o $output
1746 # Give higher priority
1747 kdiff3.priority = 1
1748
1749 # Changing the priority of preconfigured tool
1750 meld.priority = 0
1751
1752 # Disable a preconfigured tool
1753 vimdiff.disabled = yes
1754
1755 # Define new tool
1756 myHtmlTool.args = -m $local $other $base $output
1757 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
1758 myHtmlTool.priority = 1
1759
1760 Supported arguments:
1761
1762 priority
1763
1764 The priority in which to evaluate this tool. (default: 0)
1765
1766 executable
1767
1768 Either just the name of the executable or its pathname.
1769
1770 On Windows, the path can use environment variables with ${Pro‐
1771 gramFiles} syntax.
1772
1773 (default: the tool name)
1774
1775 args
1776
1777 The arguments to pass to the tool executable. You can refer to
1778 the files being merged as well as the output file through these
1779 variables: $base, $local, $other, $output.
1780
1781 The meaning of $local and $other can vary depending on which ac‐
1782 tion is being performed. During an update or merge, $local rep‐
1783 resents the original state of the file, while $other represents
1784 the commit you are updating to or the commit you are merging
1785 with. During a rebase, $local represents the destination of the
1786 rebase, and $other represents the commit being rebased.
1787
1788 Some operations define custom labels to assist with identifying
1789 the revisions, accessible via $labellocal, $labelother, and $la‐
1790 belbase. If custom labels are not available, these will be lo‐
1791 cal, other, and base, respectively. (default: $local $base
1792 $other)
1793
1794 premerge
1795
1796 Attempt to run internal non-interactive 3-way merge tool before
1797 launching external tool. Options are true, false, keep,
1798 keep-merge3, or keep-mergediff (experimental). The keep option
1799 will leave markers in the file if the premerge fails. The
1800 keep-merge3 will do the same but include information about the
1801 base of the merge in the marker (see internal :merge3 in hg help
1802 merge-tools). The keep-mergediff option is similar but uses a
1803 different marker style (see internal :merge3 in hg help
1804 merge-tools). (default: True)
1805
1806 binary
1807
1808 This tool can merge binary files. (default: False, unless tool
1809 was selected by file pattern match)
1810
1811 symlink
1812
1813 This tool can merge symlinks. (default: False)
1814
1815 check
1816
1817 A list of merge success-checking options:
1818
1819 changed
1820
1821 Ask whether merge was successful when the merged file
1822 shows no changes.
1823
1824 conflicts
1825
1826 Check whether there are conflicts even though the tool
1827 reported success.
1828
1829 prompt
1830
1831 Always prompt for merge success, regardless of success
1832 reported by tool.
1833
1834 fixeol
1835
1836 Attempt to fix up EOL changes caused by the merge tool. (de‐
1837 fault: False)
1838
1839 gui
1840
1841 This tool requires a graphical interface to run. (default:
1842 False)
1843
1844 mergemarkers
1845
1846 Controls whether the labels passed via $labellocal, $labelother,
1847 and $labelbase are detailed (respecting mergemarkertemplate) or
1848 basic. If premerge is keep or keep-merge3, the conflict markers
1849 generated during premerge will be detailed if either this option
1850 or the corresponding option in the [ui] section is detailed.
1851 (default: basic)
1852
1853 mergemarkertemplate
1854
1855 This setting can be used to override mergemarker from the [com‐
1856 mand-templates] section on a per-tool basis; this applies to the
1857 $label-prefixed variables and to the conflict markers that are
1858 generated if premerge is keep` or ``keep-merge3. See the corre‐
1859 sponding variable in [ui] for more information.
1860
1861 regkey
1862
1863 Windows registry key which describes install location of this
1864 tool. Mercurial will search for this key first under HKEY_CUR‐
1865 RENT_USER and then under HKEY_LOCAL_MACHINE. (default: None)
1866
1867 regkeyalt
1868
1869 An alternate Windows registry key to try if the first key is not
1870 found. The alternate key uses the same regname and regappend
1871 semantics of the primary key. The most common use for this key
1872 is to search for 32bit applications on 64bit operating systems.
1873 (default: None)
1874
1875 regname
1876
1877 Name of value to read from specified registry key. (default:
1878 the unnamed (default) value)
1879
1880 regappend
1881
1882 String to append to the value read from the registry, typically
1883 the executable name of the tool. (default: None)
1884
1885 pager
1886 Setting used to control when to paginate and with what external tool.
1887 See hg help pager for details.
1888
1889 pager
1890
1891 Define the external tool used as pager.
1892
1893 If no pager is set, Mercurial uses the environment variable
1894 $PAGER. If neither pager.pager, nor $PAGER is set, a default
1895 pager will be used, typically less on Unix and more on Windows.
1896 Example:
1897
1898 [pager]
1899 pager = less -FRX
1900
1901 ignore
1902
1903 List of commands to disable the pager for. Example:
1904
1905 [pager]
1906 ignore = version, help, update
1907
1908 patch
1909 Settings used when applying patches, for instance through the 'import'
1910 command or with Mercurial Queues extension.
1911
1912 eol
1913
1914 When set to 'strict' patch content and patched files end of
1915 lines are preserved. When set to lf or crlf, both files end of
1916 lines are ignored when patching and the result line endings are
1917 normalized to either LF (Unix) or CRLF (Windows). When set to
1918 auto, end of lines are again ignored while patching but line
1919 endings in patched files are normalized to their original set‐
1920 ting on a per-file basis. If target file does not exist or has
1921 no end of line, patch line endings are preserved. (default:
1922 strict)
1923
1924 fuzz
1925
1926 The number of lines of 'fuzz' to allow when applying patches.
1927 This controls how much context the patcher is allowed to ignore
1928 when trying to apply a patch. (default: 2)
1929
1930 paths
1931 Assigns symbolic names and behavior to repositories.
1932
1933 Options are symbolic names defining the URL or directory that is the
1934 location of the repository. Example:
1935
1936 [paths]
1937 my_server = https://example.com/my_repo
1938 local_path = /home/me/repo
1939
1940 These symbolic names can be used from the command line. To pull from
1941 my_server: hg pull my_server. To push to local_path: hg push local_path
1942 . You can check hg help urls for details about valid URLs.
1943
1944 Options containing colons (:) denote sub-options that can influence be‐
1945 havior for that specific path. Example:
1946
1947 [paths]
1948 my_server = https://example.com/my_path
1949 my_server:pushurl = ssh://example.com/my_path
1950
1951 Paths using the path://otherpath scheme will inherit the sub-options
1952 value from the path they point to.
1953
1954 The following sub-options can be defined:
1955
1956 multi-urls
1957
1958 A boolean option. When enabled the value of the [paths] entry
1959 will be parsed as a list and the alias will resolve to multiple
1960 destination. If some of the list entry use the path:// syntax,
1961 the suboption will be inherited individually.
1962
1963 pushurl
1964
1965 The URL to use for push operations. If not defined, the location
1966 defined by the path's main entry is used.
1967
1968 pushrev
1969
1970 A revset defining which revisions to push by default.
1971
1972 When hg push is executed without a -r argument, the revset de‐
1973 fined by this sub-option is evaluated to determine what to push.
1974
1975 For example, a value of . will push the working directory's re‐
1976 vision by default.
1977
1978 Revsets specifying bookmarks will not result in the bookmark be‐
1979 ing pushed.
1980
1981 bookmarks.mode
1982
1983 How bookmark will be dealt during the exchange. It support the
1984 following value
1985
1986 • default: the default behavior, local and remote bookmarks are
1987 "merged" on push/pull.
1988
1989 • mirror: when pulling, replace local bookmarks by remote book‐
1990 marks. This is useful to replicate a repository, or as an op‐
1991 timization.
1992
1993 • ignore: ignore bookmarks during exchange. (This currently
1994 only affect pulling)
1995
1996 The following special named paths exist:
1997
1998 default
1999
2000 The URL or directory to use when no source or remote is speci‐
2001 fied.
2002
2003 hg clone will automatically define this path to the location the
2004 repository was cloned from.
2005
2006 default-push
2007
2008 (deprecated) The URL or directory for the default hg push loca‐
2009 tion. default:pushurl should be used instead.
2010
2011 phases
2012 Specifies default handling of phases. See hg help phases for more in‐
2013 formation about working with phases.
2014
2015 publish
2016
2017 Controls draft phase behavior when working as a server. When
2018 true, pushed changesets are set to public in both client and
2019 server and pulled or cloned changesets are set to public in the
2020 client. (default: True)
2021
2022 new-commit
2023
2024 Phase of newly-created commits. (default: draft)
2025
2026 checksubrepos
2027
2028 Check the phase of the current revision of each subrepository.
2029 Allowed values are "ignore", "follow" and "abort". For settings
2030 other than "ignore", the phase of the current revision of each
2031 subrepository is checked before committing the parent reposi‐
2032 tory. If any of those phases is greater than the phase of the
2033 parent repository (e.g. if a subrepo is in a "secret" phase
2034 while the parent repo is in "draft" phase), the commit is either
2035 aborted (if checksubrepos is set to "abort") or the higher phase
2036 is used for the parent repository commit (if set to "follow").
2037 (default: follow)
2038
2039 profiling
2040 Specifies profiling type, format, and file output. Two profilers are
2041 supported: an instrumenting profiler (named ls), and a sampling pro‐
2042 filer (named stat).
2043
2044 In this section description, 'profiling data' stands for the raw data
2045 collected during profiling, while 'profiling report' stands for a sta‐
2046 tistical text report generated from the profiling data.
2047
2048 enabled
2049
2050 Enable the profiler. (default: false)
2051
2052 This is equivalent to passing --profile on the command line.
2053
2054 type
2055
2056 The type of profiler to use. (default: stat)
2057
2058 ls
2059
2060 Use Python's built-in instrumenting profiler. This pro‐
2061 filer works on all platforms, but each line number it re‐
2062 ports is the first line of a function. This restriction
2063 makes it difficult to identify the expensive parts of a
2064 non-trivial function.
2065
2066 stat
2067
2068 Use a statistical profiler, statprof. This profiler is
2069 most useful for profiling commands that run for longer
2070 than about 0.1 seconds.
2071
2072 format
2073
2074 Profiling format. Specific to the ls instrumenting profiler.
2075 (default: text)
2076
2077 text
2078
2079 Generate a profiling report. When saving to a file, it
2080 should be noted that only the report is saved, and the
2081 profiling data is not kept.
2082
2083 kcachegrind
2084
2085 Format profiling data for kcachegrind use: when saving to
2086 a file, the generated file can directly be loaded into
2087 kcachegrind.
2088
2089 statformat
2090
2091 Profiling format for the stat profiler. (default: hotpath)
2092
2093 hotpath
2094
2095 Show a tree-based display containing the hot path of exe‐
2096 cution (where most time was spent).
2097
2098 bymethod
2099
2100 Show a table of methods ordered by how frequently they
2101 are active.
2102
2103 byline
2104
2105 Show a table of lines in files ordered by how frequently
2106 they are active.
2107
2108 json
2109
2110 Render profiling data as JSON.
2111
2112 freq
2113
2114 Sampling frequency. Specific to the stat sampling profiler.
2115 (default: 1000)
2116
2117 output
2118
2119 File path where profiling data or report should be saved. If the
2120 file exists, it is replaced. (default: None, data is printed on
2121 stderr)
2122
2123 sort
2124
2125 Sort field. Specific to the ls instrumenting profiler. One of
2126 callcount, reccallcount, totaltime and inlinetime. (default:
2127 inlinetime)
2128
2129 time-track
2130
2131 Control if the stat profiler track cpu or real time. (default:
2132 cpu on Windows, otherwise real)
2133
2134 limit
2135
2136 Number of lines to show. Specific to the ls instrumenting pro‐
2137 filer. (default: 30)
2138
2139 nested
2140
2141 Show at most this number of lines of drill-down info after each
2142 main entry. This can help explain the difference between Total
2143 and Inline. Specific to the ls instrumenting profiler. (de‐
2144 fault: 0)
2145
2146 showmin
2147
2148 Minimum fraction of samples an entry must have for it to be dis‐
2149 played. Can be specified as a float between 0.0 and 1.0 or can
2150 have a % afterwards to allow values up to 100. e.g. 5%.
2151
2152 Only used by the stat profiler.
2153
2154 For the hotpath format, default is 0.05. For the chrome format,
2155 default is 0.005.
2156
2157 The option is unused on other formats.
2158
2159 showmax
2160
2161 Maximum fraction of samples an entry can have before it is ig‐
2162 nored in display. Values format is the same as showmin.
2163
2164 Only used by the stat profiler.
2165
2166 For the chrome format, default is 0.999.
2167
2168 The option is unused on other formats.
2169
2170 showtime
2171
2172 Show time taken as absolute durations, in addition to percent‐
2173 ages. Only used by the hotpath format. (default: true)
2174
2175 progress
2176 Mercurial commands can draw progress bars that are as informative as
2177 possible. Some progress bars only offer indeterminate information,
2178 while others have a definite end point.
2179
2180 debug
2181
2182 Whether to print debug info when updating the progress bar. (de‐
2183 fault: False)
2184
2185 delay
2186
2187 Number of seconds (float) before showing the progress bar. (de‐
2188 fault: 3)
2189
2190 changedelay
2191
2192 Minimum delay before showing a new topic. When set to less than
2193 3 * refresh, that value will be used instead. (default: 1)
2194
2195 estimateinterval
2196
2197 Maximum sampling interval in seconds for speed and estimated
2198 time calculation. (default: 60)
2199
2200 refresh
2201
2202 Time in seconds between refreshes of the progress bar. (default:
2203 0.1)
2204
2205 format
2206
2207 Format of the progress bar.
2208
2209 Valid entries for the format field are topic, bar, number, unit,
2210 estimate, speed, and item. item defaults to the last 20 charac‐
2211 ters of the item, but this can be changed by adding either
2212 -<num> which would take the last num characters, or +<num> for
2213 the first num characters.
2214
2215 (default: topic bar number estimate)
2216
2217 width
2218
2219 If set, the maximum width of the progress information (that is,
2220 min(width, term width) will be used).
2221
2222 clear-complete
2223
2224 Clear the progress bar after it's done. (default: True)
2225
2226 disable
2227
2228 If true, don't show a progress bar.
2229
2230 assume-tty
2231
2232 If true, ALWAYS show a progress bar, unless disable is given.
2233
2234 rebase
2235 evolution.allowdivergence
2236
2237 Default to False, when True allow creating divergence when per‐
2238 forming rebase of obsolete changesets.
2239
2240 revsetalias
2241 Alias definitions for revsets. See hg help revsets for details.
2242
2243 rewrite
2244 backup-bundle
2245
2246 Whether to save stripped changesets to a bundle file. (default:
2247 True)
2248
2249 update-timestamp
2250
2251 If true, updates the date and time of the changeset to current.
2252 It is only applicable for hg amend, hg commit --amend and hg un‐
2253 commit in the current version.
2254
2255 empty-successor
2256
2257 Control what happens with empty successors that are the result of
2258 rewrite operations. If set to skip, the successor is not created. If
2259 set to keep, the empty successor is created and kept.
2260
2261 Currently, only the rebase and absorb commands consider this config‐
2262 uration. (EXPERIMENTAL)
2263
2264 share
2265 safe-mismatch.source-safe
2266
2267 Controls what happens when the shared repository does not use
2268 the share-safe mechanism but its source repository does.
2269
2270 Possible values are abort (default), allow, upgrade-abort and
2271 upgrade-allow.
2272
2273 abort Disallows running any command and aborts allow Respects
2274 the feature presence in the share source upgrade-abort tries to
2275 upgrade the share to use share-safe; if it fails, aborts up‐
2276 grade-allow tries to upgrade the share; if it fails, continue by
2277 respecting the share source setting
2278
2279 Check hg help config.format.use-share-safe for details about the
2280 share-safe feature.
2281
2282 safe-mismatch.source-safe.warn
2283
2284 Shows a warning on operations if the shared repository does not
2285 use share-safe, but the source repository does. (default: True)
2286
2287 safe-mismatch.source-not-safe
2288
2289 Controls what happens when the shared repository uses the
2290 share-safe mechanism but its source does not.
2291
2292 Possible values are abort (default), allow, downgrade-abort and
2293 downgrade-allow.
2294
2295 abort Disallows running any command and aborts allow Respects
2296 the feature presence in the share source downgrade-abort tries
2297 to downgrade the share to not use share-safe; if it fails,
2298 aborts downgrade-allow tries to downgrade the share to not use
2299 share-safe; if it fails, continue by respecting the shared
2300 source setting
2301
2302 Check hg help config.format.use-share-safe for details about the
2303 share-safe feature.
2304
2305 safe-mismatch.source-not-safe.warn
2306
2307 Shows a warning on operations if the shared repository uses
2308 share-safe, but the source repository does not. (default: True)
2309
2310 storage
2311 Control the strategy Mercurial uses internally to store history. Op‐
2312 tions in this category impact performance and repository size.
2313
2314 revlog.issue6528.fix-incoming
2315
2316 Version 5.8 of Mercurial had a bug leading to altering the par‐
2317 ent of file revision with copy information (or any other meta‐
2318 data) on exchange. This leads to the copy metadata to be over‐
2319 looked by various internal logic. The issue was fixed in Mercu‐
2320 rial 5.8.1. (See
2321 https://bz.mercurial-scm.org/show_bug.cgi?id=6528 for details)
2322
2323 As a result Mercurial is now checking and fixing incoming file
2324 revisions to make sure there parents are in the right order.
2325 This behavior can be disabled by setting this option to no. This
2326 apply to revisions added through push, pull, clone and unbundle.
2327
2328 To fix affected revisions that already exist within the reposi‐
2329 tory, one can use hg debug-repair-issue-6528.
2330
2331 revlog.optimize-delta-parent-choice
2332
2333 When storing a merge revision, both parents will be equally con‐
2334 sidered as a possible delta base. This results in better delta
2335 selection and improved revlog compression. This option is en‐
2336 abled by default.
2337
2338 Turning this option off can result in large increase of reposi‐
2339 tory size for repository with many merges.
2340
2341 revlog.persistent-nodemap.mmap
2342
2343 Whether to use the Operating System "memory mapping" feature
2344 (when possible) to access the persistent nodemap data. This im‐
2345 prove performance and reduce memory pressure.
2346
2347 Default to True.
2348
2349 For details on the "persistent-nodemap" feature, see: hg help
2350 config.format.use-persistent-nodemap.
2351
2352 revlog.persistent-nodemap.slow-path
2353
2354 Control the behavior of Merucrial when using a repository with
2355 "persistent" nodemap with an installation of Mercurial without a
2356 fast implementation for the feature:
2357
2358 allow: Silently use the slower implementation to access the
2359 repository. warn: Warn, but use the slower implementation to
2360 access the repository. abort: Prevent access to such reposito‐
2361 ries. (This is the default)
2362
2363 For details on the "persistent-nodemap" feature, see: hg help
2364 config.format.use-persistent-nodemap.
2365
2366 revlog.reuse-external-delta-parent
2367
2368 Control the order in which delta parents are considered when
2369 adding new revisions from an external source. (typically: apply
2370 bundle from hg pull or hg push).
2371
2372 New revisions are usually provided as a delta against other re‐
2373 visions. By default, Mercurial will try to reuse this delta
2374 first, therefore using the same "delta parent" as the source.
2375 Directly using delta's from the source reduces CPU usage and
2376 usually speeds up operation. However, in some case, the source
2377 might have sub-optimal delta bases and forcing their reevalua‐
2378 tion is useful. For example, pushes from an old client could
2379 have sub-optimal delta's parent that the server want to opti‐
2380 mize. (lack of general delta, bad parents, choice, lack of
2381 sparse-revlog, etc).
2382
2383 This option is enabled by default. Turning it off will ensure
2384 bad delta parent choices from older client do not propagate to
2385 this repository, at the cost of a small increase in CPU consump‐
2386 tion.
2387
2388 Note: this option only control the order in which delta parents
2389 are considered. Even when disabled, the existing delta from the
2390 source will be reused if the same delta parent is selected.
2391
2392 revlog.reuse-external-delta
2393
2394 Control the reuse of delta from external source. (typically:
2395 apply bundle from hg pull or hg push).
2396
2397 New revisions are usually provided as a delta against another
2398 revision. By default, Mercurial will not recompute the same
2399 delta again, trusting externally provided deltas. There have
2400 been rare cases of small adjustment to the diffing algorithm in
2401 the past. So in some rare case, recomputing delta provided by
2402 ancient clients can provides better results. Disabling this op‐
2403 tion means going through a full delta recomputation for all in‐
2404 coming revisions. It means a large increase in CPU usage and
2405 will slow operations down.
2406
2407 This option is enabled by default. When disabled, it also dis‐
2408 ables the related storage.revlog.reuse-external-delta-parent op‐
2409 tion.
2410
2411 revlog.zlib.level
2412
2413 Zlib compression level used when storing data into the reposi‐
2414 tory. Accepted Value range from 1 (lowest compression) to 9
2415 (highest compression). Zlib default value is 6.
2416
2417 revlog.zstd.level
2418
2419 zstd compression level used when storing data into the reposi‐
2420 tory. Accepted Value range from 1 (lowest compression) to 22
2421 (highest compression). (default 3)
2422
2423 server
2424 Controls generic server settings.
2425
2426 bookmarks-pushkey-compat
2427
2428 Trigger pushkey hook when being pushed bookmark updates. This
2429 config exist for compatibility purpose (default to True)
2430
2431 If you use pushkey and pre-pushkey hooks to control bookmark
2432 movement we recommend you migrate them to txnclose-bookmark and
2433 pretxnclose-bookmark.
2434
2435 compressionengines
2436
2437 List of compression engines and their relative priority to ad‐
2438 vertise to clients.
2439
2440 The order of compression engines determines their priority, the
2441 first having the highest priority. If a compression engine is
2442 not listed here, it won't be advertised to clients.
2443
2444 If not set (the default), built-in defaults are used. Run hg de‐
2445 buginstall to list available compression engines and their de‐
2446 fault wire protocol priority.
2447
2448 Older Mercurial clients only support zlib compression and this
2449 setting has no effect for legacy clients.
2450
2451 uncompressed
2452
2453 Whether to allow clients to clone a repository using the uncom‐
2454 pressed streaming protocol. This transfers about 40% more data
2455 than a regular clone, but uses less memory and CPU on both
2456 server and client. Over a LAN (100 Mbps or better) or a very
2457 fast WAN, an uncompressed streaming clone is a lot faster (~10x)
2458 than a regular clone. Over most WAN connections (anything slower
2459 than about 6 Mbps), uncompressed streaming is slower, because of
2460 the extra data transfer overhead. This mode will also temporar‐
2461 ily hold the write lock while determining what data to transfer.
2462 (default: True)
2463
2464 uncompressedallowsecret
2465
2466 Whether to allow stream clones when the repository contains se‐
2467 cret changesets. (default: False)
2468
2469 preferuncompressed
2470
2471 When set, clients will try to use the uncompressed streaming
2472 protocol. (default: False)
2473
2474 disablefullbundle
2475
2476 When set, servers will refuse attempts to do pull-based clones.
2477 If this option is set, preferuncompressed and/or clone bundles
2478 are highly recommended. Partial clones will still be allowed.
2479 (default: False)
2480
2481 streamunbundle
2482
2483 When set, servers will apply data sent from the client directly,
2484 otherwise it will be written to a temporary file first. This op‐
2485 tion effectively prevents concurrent pushes.
2486
2487 pullbundle
2488
2489 When set, the server will check pullbundles.manifest for bundles
2490 covering the requested heads and common nodes. The first match‐
2491 ing entry will be streamed to the client.
2492
2493 For HTTP transport, the stream will still use zlib compression
2494 for older clients.
2495
2496 concurrent-push-mode
2497
2498 Level of allowed race condition between two pushing clients.
2499
2500 • 'strict': push is abort if another client touched the reposi‐
2501 tory while the push was preparing.
2502
2503 • 'check-related': push is only aborted if it affects head that
2504 got also affected while the push was preparing. (default since
2505 5.4)
2506
2507 'check-related' only takes effect for compatible clients (ver‐
2508 sion 4.3 and later). Older clients will use 'strict'.
2509
2510 validate
2511
2512 Whether to validate the completeness of pushed changesets by
2513 checking that all new file revisions specified in manifests are
2514 present. (default: False)
2515
2516 maxhttpheaderlen
2517
2518 Instruct HTTP clients not to send request headers longer than
2519 this many bytes. (default: 1024)
2520
2521 bundle1
2522
2523 Whether to allow clients to push and pull using the legacy bun‐
2524 dle1 exchange format. (default: True)
2525
2526 bundle1gd
2527
2528 Like bundle1 but only used if the repository is using the gener‐
2529 aldelta storage format. (default: True)
2530
2531 bundle1.push
2532
2533 Whether to allow clients to push using the legacy bundle1 ex‐
2534 change format. (default: True)
2535
2536 bundle1gd.push
2537
2538 Like bundle1.push but only used if the repository is using the
2539 generaldelta storage format. (default: True)
2540
2541 bundle1.pull
2542
2543 Whether to allow clients to pull using the legacy bundle1 ex‐
2544 change format. (default: True)
2545
2546 bundle1gd.pull
2547
2548 Like bundle1.pull but only used if the repository is using the
2549 generaldelta storage format. (default: True)
2550
2551 Large repositories using the generaldelta storage format should
2552 consider setting this option because converting generaldelta
2553 repositories to the exchange format required by the bundle1 data
2554 format can consume a lot of CPU.
2555
2556 bundle2.stream
2557
2558 Whether to allow clients to pull using the bundle2 streaming
2559 protocol. (default: True)
2560
2561 zliblevel
2562
2563 Integer between -1 and 9 that controls the zlib compression
2564 level for wire protocol commands that send zlib compressed out‐
2565 put (notably the commands that send repository history data).
2566
2567 The default (-1) uses the default zlib compression level, which
2568 is likely equivalent to 6. 0 means no compression. 9 means maxi‐
2569 mum compression.
2570
2571 Setting this option allows server operators to make trade-offs
2572 between bandwidth and CPU used. Lowering the compression lowers
2573 CPU utilization but sends more bytes to clients.
2574
2575 This option only impacts the HTTP server.
2576
2577 zstdlevel
2578
2579 Integer between 1 and 22 that controls the zstd compression
2580 level for wire protocol commands. 1 is the minimal amount of
2581 compression and 22 is the highest amount of compression.
2582
2583 The default (3) should be significantly faster than zlib while
2584 likely delivering better compression ratios.
2585
2586 This option only impacts the HTTP server.
2587
2588 See also server.zliblevel.
2589
2590 view
2591
2592 Repository filter used when exchanging revisions with the peer.
2593
2594 The default view (served) excludes secret and hidden changesets.
2595 Another useful value is immutable (no draft, secret or hidden
2596 changesets). (EXPERIMENTAL)
2597
2598 smtp
2599 Configuration for extensions that need to send email messages.
2600
2601 host
2602
2603 Host name of mail server, e.g. "mail.example.com".
2604
2605 port
2606
2607 Optional. Port to connect to on mail server. (default: 465 if
2608 tls is smtps; 25 otherwise)
2609
2610 tls
2611
2612 Optional. Method to enable TLS when connecting to mail server:
2613 starttls, smtps or none. (default: none)
2614
2615 username
2616
2617 Optional. User name for authenticating with the SMTP server.
2618 (default: None)
2619
2620 password
2621
2622 Optional. Password for authenticating with the SMTP server. If
2623 not specified, interactive sessions will prompt the user for a
2624 password; non-interactive sessions will fail. (default: None)
2625
2626 local_hostname
2627
2628 Optional. The hostname that the sender can use to identify it‐
2629 self to the MTA.
2630
2631 subpaths
2632 Subrepository source URLs can go stale if a remote server changes name
2633 or becomes temporarily unavailable. This section lets you define re‐
2634 write rules of the form:
2635
2636 <pattern> = <replacement>
2637
2638 where pattern is a regular expression matching a subrepository source
2639 URL and replacement is the replacement string used to rewrite it.
2640 Groups can be matched in pattern and referenced in replacements. For
2641 instance:
2642
2643 http://server/(.*)-hg/ = http://hg.server/\1/
2644
2645 rewrites http://server/foo-hg/ into http://hg.server/foo/.
2646
2647 Relative subrepository paths are first made absolute, and the rewrite
2648 rules are then applied on the full (absolute) path. If pattern doesn't
2649 match the full path, an attempt is made to apply it on the relative
2650 path alone. The rules are applied in definition order.
2651
2652 subrepos
2653 This section contains options that control the behavior of the sub‐
2654 repositories feature. See also hg help subrepos.
2655
2656 Security note: auditing in Mercurial is known to be insufficient to
2657 prevent clone-time code execution with carefully constructed Git subre‐
2658 pos. It is unknown if a similar detect is present in Subversion subre‐
2659 pos. Both Git and Subversion subrepos are disabled by default out of
2660 security concerns. These subrepo types can be enabled using the respec‐
2661 tive options below.
2662
2663 allowed
2664
2665 Whether subrepositories are allowed in the working directory.
2666
2667 When false, commands involving subrepositories (like hg update)
2668 will fail for all subrepository types. (default: true)
2669
2670 hg:allowed
2671
2672 Whether Mercurial subrepositories are allowed in the working di‐
2673 rectory. This option only has an effect if subrepos.allowed is
2674 true. (default: true)
2675
2676 git:allowed
2677
2678 Whether Git subrepositories are allowed in the working direc‐
2679 tory. This option only has an effect if subrepos.allowed is
2680 true.
2681
2682 See the security note above before enabling Git subrepos. (de‐
2683 fault: false)
2684
2685 svn:allowed
2686
2687 Whether Subversion subrepositories are allowed in the working
2688 directory. This option only has an effect if subrepos.allowed is
2689 true.
2690
2691 See the security note above before enabling Subversion subrepos.
2692 (default: false)
2693
2694 templatealias
2695 Alias definitions for templates. See hg help templates for details.
2696
2697 templates
2698 Use the [templates] section to define template strings. See hg help
2699 templates for details.
2700
2701 trusted
2702 Mercurial will not use the settings in the .hg/hgrc file from a reposi‐
2703 tory if it doesn't belong to a trusted user or to a trusted group, as
2704 various hgrc features allow arbitrary commands to be run. This issue is
2705 often encountered when configuring hooks or extensions for shared
2706 repositories or servers. However, the web interface will use some safe
2707 settings from the [web] section.
2708
2709 This section specifies what users and groups are trusted. The current
2710 user is always trusted. To trust everybody, list a user or a group with
2711 name *. These settings must be placed in an already-trusted file to
2712 take effect, such as $HOME/.hgrc of the user or service running Mercu‐
2713 rial.
2714
2715 users
2716
2717 Comma-separated list of trusted users.
2718
2719 groups
2720
2721 Comma-separated list of trusted groups.
2722
2723 ui
2724 User interface controls.
2725
2726 archivemeta
2727
2728 Whether to include the .hg_archival.txt file containing meta
2729 data (hashes for the repository base and for tip) in archives
2730 created by the hg archive command or downloaded via hgweb. (de‐
2731 fault: True)
2732
2733 askusername
2734
2735 Whether to prompt for a username when committing. If True, and
2736 neither $HGUSER nor $EMAIL has been specified, then the user
2737 will be prompted to enter a username. If no username is entered,
2738 the default USER@HOST is used instead. (default: False)
2739
2740 clonebundles
2741
2742 Whether the "clone bundles" feature is enabled.
2743
2744 When enabled, hg clone may download and apply a server-adver‐
2745 tised bundle file from a URL instead of using the normal ex‐
2746 change mechanism.
2747
2748 This can likely result in faster and more reliable clones.
2749
2750 (default: True)
2751
2752 clonebundlefallback
2753
2754 Whether failure to apply an advertised "clone bundle" from a
2755 server should result in fallback to a regular clone.
2756
2757 This is disabled by default because servers advertising "clone
2758 bundles" often do so to reduce server load. If advertised bun‐
2759 dles start mass failing and clients automatically fall back to a
2760 regular clone, this would add significant and unexpected load to
2761 the server since the server is expecting clone operations to be
2762 offloaded to pre-generated bundles. Failing fast (the default
2763 behavior) ensures clients don't overwhelm the server when "clone
2764 bundle" application fails.
2765
2766 (default: False)
2767
2768 clonebundleprefers
2769
2770 Defines preferences for which "clone bundles" to use.
2771
2772 Servers advertising "clone bundles" may advertise multiple
2773 available bundles. Each bundle may have different attributes,
2774 such as the bundle type and compression format. This option is
2775 used to prefer a particular bundle over another.
2776
2777 The following keys are defined by Mercurial:
2778
2779 BUNDLESPEC
2780 A bundle type specifier. These are strings passed to hg
2781 bundle -t. e.g. gzip-v2 or bzip2-v1.
2782
2783 COMPRESSION
2784 The compression format of the bundle. e.g. gzip and
2785 bzip2.
2786
2787 Server operators may define custom keys.
2788
2789 Example values: COMPRESSION=bzip2, BUNDLESPEC=gzip-v2, COMPRES‐
2790 SION=gzip.
2791
2792 By default, the first bundle advertised by the server is used.
2793
2794 color
2795
2796 When to colorize output. Possible value are Boolean ("yes" or
2797 "no"), or "debug", or "always". (default: "yes"). "yes" will use
2798 color whenever it seems possible. See hg help color for details.
2799
2800 commitsubrepos
2801
2802 Whether to commit modified subrepositories when committing the
2803 parent repository. If False and one subrepository has uncommit‐
2804 ted changes, abort the commit. (default: False)
2805
2806 debug
2807
2808 Print debugging information. (default: False)
2809
2810 editor
2811
2812 The editor to use during a commit. (default: $EDITOR or vi)
2813
2814 fallbackencoding
2815
2816 Encoding to try if it's not possible to decode the changelog us‐
2817 ing UTF-8. (default: ISO-8859-1)
2818
2819 graphnodetemplate
2820
2821 (DEPRECATED) Use command-templates.graphnode instead.
2822
2823 ignore
2824
2825 A file to read per-user ignore patterns from. This file should
2826 be in the same format as a repository-wide .hgignore file. File‐
2827 names are relative to the repository root. This option supports
2828 hook syntax, so if you want to specify multiple ignore files,
2829 you can do so by setting something like ignore.other = ~/.hgig‐
2830 nore2. For details of the ignore file format, see the hgig‐
2831 nore(5) man page.
2832
2833 interactive
2834
2835 Allow to prompt the user. (default: True)
2836
2837 interface
2838
2839 Select the default interface for interactive features (default:
2840 text). Possible values are 'text' and 'curses'.
2841
2842 interface.chunkselector
2843
2844 Select the interface for change recording (e.g. hg commit -i).
2845 Possible values are 'text' and 'curses'. This config overrides
2846 the interface specified by ui.interface.
2847
2848 large-file-limit
2849
2850 Largest file size that gives no memory use warning. Possible
2851 values are integers or 0 to disable the check. Value is ex‐
2852 pressed in bytes by default, one can use standard units for con‐
2853 venience (e.g. 10MB, 0.1GB, etc) (default: 10MB)
2854
2855 logtemplate
2856
2857 (DEPRECATED) Use command-templates.log instead.
2858
2859 merge
2860
2861 The conflict resolution program to use during a manual merge.
2862 For more information on merge tools see hg help merge-tools.
2863 For configuring merge tools see the [merge-tools] section.
2864
2865 mergemarkers
2866
2867 Sets the merge conflict marker label styling. The detailed style
2868 uses the command-templates.mergemarker setting to style the la‐
2869 bels. The basic style just uses 'local' and 'other' as the
2870 marker label. One of basic or detailed. (default: basic)
2871
2872 mergemarkertemplate
2873
2874 (DEPRECATED) Use command-templates.mergemarker instead.
2875
2876 message-output
2877
2878 Where to write status and error messages. (default: stdio)
2879
2880 channel
2881
2882 Use separate channel for structured output. (Com‐
2883 mand-server only)
2884
2885 stderr
2886
2887 Everything to stderr.
2888
2889 stdio
2890
2891 Status to stdout, and error to stderr.
2892
2893 origbackuppath
2894
2895 The path to a directory used to store generated .orig files. If
2896 the path is not a directory, one will be created. If set, files
2897 stored in this directory have the same name as the original file
2898 and do not have a .orig suffix.
2899
2900 paginate
2901
2902 Control the pagination of command output (default: True). See hg
2903 help pager for details.
2904
2905 patch
2906
2907 An optional external tool that hg import and some extensions
2908 will use for applying patches. By default Mercurial uses an in‐
2909 ternal patch utility. The external tool must work as the common
2910 Unix patch program. In particular, it must accept a -p argument
2911 to strip patch headers, a -d argument to specify the current di‐
2912 rectory, a file name to patch, and a patch file to take from
2913 stdin.
2914
2915 It is possible to specify a patch tool together with extra argu‐
2916 ments. For example, setting this option to patch --merge will
2917 use the patch program with its 2-way merge option.
2918
2919 portablefilenames
2920
2921 Check for portable filenames. Can be warn, ignore or abort.
2922 (default: warn)
2923
2924 warn
2925
2926 Print a warning message on POSIX platforms, if a file
2927 with a non-portable filename is added (e.g. a file with a
2928 name that can't be created on Windows because it contains
2929 reserved parts like AUX, reserved characters like :, or
2930 would cause a case collision with an existing file).
2931
2932 ignore
2933
2934 Don't print a warning.
2935
2936 abort
2937
2938 The command is aborted.
2939
2940 true
2941
2942 Alias for warn.
2943
2944 false
2945
2946 Alias for ignore.
2947
2948 On Windows, this configuration option is ignored and the command
2949 aborted.
2950
2951 pre-merge-tool-output-template
2952
2953 (DEPRECATED) Use command-template.pre-merge-tool-output instead.
2954
2955 quiet
2956
2957 Reduce the amount of output printed. (default: False)
2958
2959 relative-paths
2960
2961 Prefer relative paths in the UI.
2962
2963 remotecmd
2964
2965 Remote command to use for clone/push/pull operations. (default:
2966 hg)
2967
2968 report_untrusted
2969
2970 Warn if a .hg/hgrc file is ignored due to not being owned by a
2971 trusted user or group. (default: True)
2972
2973 slash
2974
2975 (Deprecated. Use slashpath template filter instead.)
2976
2977 Display paths using a slash (/) as the path separator. This only
2978 makes a difference on systems where the default path separator
2979 is not the slash character (e.g. Windows uses the backslash
2980 character (\)). (default: False)
2981
2982 statuscopies
2983
2984 Display copies in the status command.
2985
2986 ssh
2987
2988 Command to use for SSH connections. (default: ssh)
2989
2990 ssherrorhint
2991
2992 A hint shown to the user in the case of SSH error (e.g. Please
2993 see http://company/internalwiki/ssh.html)
2994
2995 strict
2996
2997 Require exact command names, instead of allowing unambiguous ab‐
2998 breviations. (default: False)
2999
3000 style
3001
3002 Name of style to use for command output.
3003
3004 supportcontact
3005
3006 A URL where users should report a Mercurial traceback. Use this
3007 if you are a large organisation with its own Mercurial deploy‐
3008 ment process and crash reports should be addressed to your in‐
3009 ternal support.
3010
3011 textwidth
3012
3013 Maximum width of help text. A longer line generated by hg help
3014 or hg subcommand --help will be broken after white space to get
3015 this width or the terminal width, whichever comes first. A
3016 non-positive value will disable this and the terminal width will
3017 be used. (default: 78)
3018
3019 timeout
3020
3021 The timeout used when a lock is held (in seconds), a negative
3022 value means no timeout. (default: 600)
3023
3024 timeout.warn
3025
3026 Time (in seconds) before a warning is printed about held lock. A
3027 negative value means no warning. (default: 0)
3028
3029 traceback
3030
3031 Mercurial always prints a traceback when an unknown exception
3032 occurs. Setting this to True will make Mercurial print a trace‐
3033 back on all exceptions, even those recognized by Mercurial (such
3034 as IOError or MemoryError). (default: False)
3035
3036 tweakdefaults
3037
3038 By default Mercurial's behavior changes very little from release to
3039 release, but over time the recommended config settings shift. Enable
3040 this config to opt in to get automatic tweaks to Mercurial's behav‐
3041 ior over time. This config setting will have no effect if HGPLAIN is
3042 set or HGPLAINEXCEPT is set and does not include tweakdefaults. (de‐
3043 fault: False)
3044
3045 It currently means:
3046
3047 [ui]
3048 # The rollback command is dangerous. As a rule, don't use it.
3049 rollback = False
3050 # Make `hg status` report copy information
3051 statuscopies = yes
3052 # Prefer curses UIs when available. Revert to plain-text with `text`.
3053 interface = curses
3054 # Make compatible commands emit cwd-relative paths by default.
3055 relative-paths = yes
3056
3057 [commands]
3058 # Grep working directory by default.
3059 grep.all-files = True
3060 # Refuse to perform an `hg update` that would cause a file content merge
3061 update.check = noconflict
3062 # Show conflicts information in `hg status`
3063 status.verbose = True
3064 # Make `hg resolve` with no action (like `-m`) fail instead of re-merging.
3065 resolve.explicit-re-merge = True
3066
3067 [diff]
3068 git = 1
3069 showfunc = 1
3070 word-diff = 1
3071
3072 username
3073
3074 The committer of a changeset created when running "commit".
3075 Typically a person's name and email address, e.g. Fred Widget
3076 <fred@example.com>. Environment variables in the username are
3077 expanded.
3078
3079 (default: $EMAIL or username@hostname. If the username in hgrc
3080 is empty, e.g. if the system admin set username = in the system
3081 hgrc, it has to be specified manually or in a different hgrc
3082 file)
3083
3084 verbose
3085
3086 Increase the amount of output printed. (default: False)
3087
3088 command-templates
3089 Templates used for customizing the output of commands.
3090
3091 graphnode
3092
3093 The template used to print changeset nodes in an ASCII revision
3094 graph. (default: {graphnode})
3095
3096 log
3097
3098 Template string for commands that print changesets.
3099
3100 mergemarker
3101
3102 The template used to print the commit description next to each
3103 conflict marker during merge conflicts. See hg help templates
3104 for the template format.
3105
3106 Defaults to showing the hash, tags, branches, bookmarks, author,
3107 and the first line of the commit description.
3108
3109 If you use non-ASCII characters in names for tags, branches,
3110 bookmarks, authors, and/or commit descriptions, you must pay at‐
3111 tention to encodings of managed files. At template expansion,
3112 non-ASCII characters use the encoding specified by the --encod‐
3113 ing global option, HGENCODING or other environment variables
3114 that govern your locale. If the encoding of the merge markers is
3115 different from the encoding of the merged files, serious prob‐
3116 lems may occur.
3117
3118 Can be overridden per-merge-tool, see the [merge-tools] section.
3119
3120 oneline-summary
3121
3122 A template used by hg rebase and other commands for showing a
3123 one-line summary of a commit. If the template configured here is
3124 longer than one line, then only the first line is used.
3125
3126 The template can be overridden per command by defining a tem‐
3127 plate in oneline-summary.<command>, where <command> can be e.g.
3128 "rebase".
3129
3130 pre-merge-tool-output
3131
3132 A template that is printed before executing an external merge
3133 tool. This can be used to print out additional context that
3134 might be useful to have during the conflict resolution, such as
3135 the description of the various commits involved or book‐
3136 marks/tags.
3137
3138 Additional information is available in the local`, ``base, and
3139 other dicts. For example: {local.label}, {base.name}, or
3140 {other.islink}.
3141
3142 web
3143 Web interface configuration. The settings in this section apply to both
3144 the builtin webserver (started by hg serve) and the script you run
3145 through a webserver (hgweb.cgi and the derivatives for FastCGI and
3146 WSGI).
3147
3148 The Mercurial webserver does no authentication (it does not prompt for
3149 usernames and passwords to validate who users are), but it does do au‐
3150 thorization (it grants or denies access for authenticated users based
3151 on settings in this section). You must either configure your webserver
3152 to do authentication for you, or disable the authorization checks.
3153
3154 For a quick setup in a trusted environment, e.g., a private LAN, where
3155 you want it to accept pushes from anybody, you can use the following
3156 command line:
3157
3158 $ hg --config web.allow-push=* --config web.push_ssl=False serve
3159
3160 Note that this will allow anybody to push anything to the server and
3161 that this should not be used for public servers.
3162
3163 The full set of options is:
3164
3165 accesslog
3166
3167 Where to output the access log. (default: stdout)
3168
3169 address
3170
3171 Interface address to bind to. (default: all)
3172
3173 allow-archive
3174
3175 List of archive format (bz2, gz, zip) allowed for downloading.
3176 (default: empty)
3177
3178 allowbz2
3179
3180 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
3181 revisions. (default: False)
3182
3183 allowgz
3184
3185 (DEPRECATED) Whether to allow .tar.gz downloading of repository
3186 revisions. (default: False)
3187
3188 allow-pull
3189
3190 Whether to allow pulling from the repository. (default: True)
3191
3192 allow-push
3193
3194 Whether to allow pushing to the repository. If empty or not set,
3195 pushing is not allowed. If the special value *, any remote user
3196 can push, including unauthenticated users. Otherwise, the remote
3197 user must have been authenticated, and the authenticated user
3198 name must be present in this list. The contents of the al‐
3199 low-push list are examined after the deny_push list.
3200
3201 allow_read
3202
3203 If the user has not already been denied repository access due to
3204 the contents of deny_read, this list determines whether to grant
3205 repository access to the user. If this list is not empty, and
3206 the user is unauthenticated or not present in the list, then ac‐
3207 cess is denied for the user. If the list is empty or not set,
3208 then access is permitted to all users by default. Setting al‐
3209 low_read to the special value * is equivalent to it not being
3210 set (i.e. access is permitted to all users). The contents of the
3211 allow_read list are examined after the deny_read list.
3212
3213 allowzip
3214
3215 (DEPRECATED) Whether to allow .zip downloading of repository re‐
3216 visions. This feature creates temporary files. (default: False)
3217
3218 archivesubrepos
3219
3220 Whether to recurse into subrepositories when archiving. (de‐
3221 fault: False)
3222
3223 baseurl
3224
3225 Base URL to use when publishing URLs in other locations, so
3226 third-party tools like email notification hooks can construct
3227 URLs. Example: http://hgserver/repos/.
3228
3229 cacerts
3230
3231 Path to file containing a list of PEM encoded certificate au‐
3232 thority certificates. Environment variables and ~user constructs
3233 are expanded in the filename. If specified on the client, then
3234 it will verify the identity of remote HTTPS servers with these
3235 certificates.
3236
3237 To disable SSL verification temporarily, specify --insecure from
3238 command line.
3239
3240 You can use OpenSSL's CA certificate file if your platform has
3241 one. On most Linux systems this will be /etc/ssl/certs/ca-cer‐
3242 tificates.crt. Otherwise you will have to generate this file
3243 manually. The form must be as follows:
3244
3245 -----BEGIN CERTIFICATE-----
3246 ... (certificate in base64 PEM encoding) ...
3247 -----END CERTIFICATE-----
3248 -----BEGIN CERTIFICATE-----
3249 ... (certificate in base64 PEM encoding) ...
3250 -----END CERTIFICATE-----
3251
3252 cache
3253
3254 Whether to support caching in hgweb. (default: True)
3255
3256 certificate
3257
3258 Certificate to use when running hg serve.
3259
3260 collapse
3261
3262 With descend enabled, repositories in subdirectories are shown
3263 at a single level alongside repositories in the current path.
3264 With collapse also enabled, repositories residing at a deeper
3265 level than the current path are grouped behind navigable direc‐
3266 tory entries that lead to the locations of these repositories.
3267 In effect, this setting collapses each collection of reposito‐
3268 ries found within a subdirectory into a single entry for that
3269 subdirectory. (default: False)
3270
3271 comparisoncontext
3272
3273 Number of lines of context to show in side-by-side file compari‐
3274 son. If negative or the value full, whole files are shown. (de‐
3275 fault: 5)
3276
3277 This setting can be overridden by a context request parameter to
3278 the comparison command, taking the same values.
3279
3280 contact
3281
3282 Name or email address of the person in charge of the repository.
3283 (default: ui.username or $EMAIL or "unknown" if unset or empty)
3284
3285 csp
3286
3287 Send a Content-Security-Policy HTTP header with this value.
3288
3289 The value may contain a special string %nonce%, which will be
3290 replaced by a randomly-generated one-time use value. If the
3291 value contains %nonce%, web.cache will be disabled, as caching
3292 undermines the one-time property of the nonce. This nonce will
3293 also be inserted into <script> elements containing inline Java‐
3294 Script.
3295
3296 Note: lots of HTML content sent by the server is derived from
3297 repository data. Please consider the potential for malicious
3298 repository data to "inject" itself into generated HTML content
3299 as part of your security threat model.
3300
3301 deny_push
3302
3303 Whether to deny pushing to the repository. If empty or not set,
3304 push is not denied. If the special value *, all remote users are
3305 denied push. Otherwise, unauthenticated users are all denied,
3306 and any authenticated user name present in this list is also de‐
3307 nied. The contents of the deny_push list are examined before the
3308 allow-push list.
3309
3310 deny_read
3311
3312 Whether to deny reading/viewing of the repository. If this list
3313 is not empty, unauthenticated users are all denied, and any au‐
3314 thenticated user name present in this list is also denied access
3315 to the repository. If set to the special value *, all remote
3316 users are denied access (rarely needed ;). If deny_read is empty
3317 or not set, the determination of repository access depends on
3318 the presence and content of the allow_read list (see descrip‐
3319 tion). If both deny_read and allow_read are empty or not set,
3320 then access is permitted to all users by default. If the reposi‐
3321 tory is being served via hgwebdir, denied users will not be able
3322 to see it in the list of repositories. The contents of the
3323 deny_read list have priority over (are examined before) the con‐
3324 tents of the allow_read list.
3325
3326 descend
3327
3328 hgwebdir indexes will not descend into subdirectories. Only
3329 repositories directly in the current path will be shown (other
3330 repositories are still available from the index corresponding to
3331 their containing path).
3332
3333 description
3334
3335 Textual description of the repository's purpose or contents.
3336 (default: "unknown")
3337
3338 encoding
3339
3340 Character encoding name. (default: the current locale charset)
3341 Example: "UTF-8".
3342
3343 errorlog
3344
3345 Where to output the error log. (default: stderr)
3346
3347 guessmime
3348
3349 Control MIME types for raw download of file content. Set to
3350 True to let hgweb guess the content type from the file exten‐
3351 sion. This will serve HTML files as text/html and might allow
3352 cross-site scripting attacks when serving untrusted reposito‐
3353 ries. (default: False)
3354
3355 hidden
3356
3357 Whether to hide the repository in the hgwebdir index. (default:
3358 False)
3359
3360 ipv6
3361
3362 Whether to use IPv6. (default: False)
3363
3364 labels
3365
3366 List of string labels associated with the repository.
3367
3368 Labels are exposed as a template keyword and can be used to cus‐
3369 tomize output. e.g. the index template can group or filter
3370 repositories by labels and the summary template can display ad‐
3371 ditional content if a specific label is present.
3372
3373 logoimg
3374
3375 File name of the logo image that some templates display on each
3376 page. The file name is relative to staticurl. That is, the full
3377 path to the logo image is "staticurl/logoimg". If unset, hgl‐
3378 ogo.png will be used.
3379
3380 logourl
3381
3382 Base URL to use for logos. If unset, https://mercurial-scm.org/
3383 will be used.
3384
3385 maxchanges
3386
3387 Maximum number of changes to list on the changelog. (default:
3388 10)
3389
3390 maxfiles
3391
3392 Maximum number of files to list per changeset. (default: 10)
3393
3394 maxshortchanges
3395
3396 Maximum number of changes to list on the shortlog, graph or
3397 filelog pages. (default: 60)
3398
3399 name
3400
3401 Repository name to use in the web interface. (default: current
3402 working directory)
3403
3404 port
3405
3406 Port to listen on. (default: 8000)
3407
3408 prefix
3409
3410 Prefix path to serve from. (default: '' (server root))
3411
3412 push_ssl
3413
3414 Whether to require that inbound pushes be transported over SSL
3415 to prevent password sniffing. (default: True)
3416
3417 refreshinterval
3418
3419 How frequently directory listings re-scan the filesystem for new
3420 repositories, in seconds. This is relevant when wildcards are
3421 used to define paths. Depending on how much filesystem traversal
3422 is required, refreshing may negatively impact performance.
3423
3424 Values less than or equal to 0 always refresh. (default: 20)
3425
3426 server-header
3427
3428 Value for HTTP Server response header.
3429
3430 static
3431
3432 Directory where static files are served from.
3433
3434 staticurl
3435
3436 Base URL to use for static files. If unset, static files (e.g.
3437 the hgicon.png favicon) will be served by the CGI script itself.
3438 Use this setting to serve them directly with the HTTP server.
3439 Example: http://hgserver/static/.
3440
3441 stripes
3442
3443 How many lines a "zebra stripe" should span in multi-line out‐
3444 put. Set to 0 to disable. (default: 1)
3445
3446 style
3447
3448 Which template map style to use. The available options are the
3449 names of subdirectories in the HTML templates path. (default:
3450 paper) Example: monoblue.
3451
3452 templates
3453
3454 Where to find the HTML templates. The default path to the HTML
3455 templates can be obtained from hg debuginstall.
3456
3457 websub
3458 Web substitution filter definition. You can use this section to define
3459 a set of regular expression substitution patterns which let you auto‐
3460 matically modify the hgweb server output.
3461
3462 The default hgweb templates only apply these substitution patterns on
3463 the revision description fields. You can apply them anywhere you want
3464 when you create your own templates by adding calls to the "websub" fil‐
3465 ter (usually after calling the "escape" filter).
3466
3467 This can be used, for example, to convert issue references to links to
3468 your issue tracker, or to convert "markdown-like" syntax into HTML (see
3469 the examples below).
3470
3471 Each entry in this section names a substitution filter. The value of
3472 each entry defines the substitution expression itself. The websub ex‐
3473 pressions follow the old interhg extension syntax, which in turn imi‐
3474 tates the Unix sed replacement syntax:
3475
3476 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
3477
3478 You can use any separator other than "/". The final "i" is optional and
3479 indicates that the search must be case insensitive.
3480
3481 Examples:
3482
3483 [websub]
3484 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
3485 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
3486 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
3487
3488 worker
3489 Parallel master/worker configuration. We currently perform working di‐
3490 rectory updates in parallel on Unix-like systems, which greatly helps
3491 performance.
3492
3493 enabled
3494
3495 Whether to enable workers code to be used. (default: true)
3496
3497 numcpus
3498
3499 Number of CPUs to use for parallel operations. A zero or nega‐
3500 tive value is treated as use the default. (default: 4 or the
3501 number of CPUs on the system, whichever is larger)
3502
3503 backgroundclose
3504
3505 Whether to enable closing file handles on background threads
3506 during certain operations. Some platforms aren't very efficient
3507 at closing file handles that have been written or appended to.
3508 By performing file closing on background threads, file write
3509 rate can increase substantially. (default: true on Windows,
3510 false elsewhere)
3511
3512 backgroundcloseminfilecount
3513
3514 Minimum number of files required to trigger background file
3515 closing. Operations not writing this many files won't start
3516 background close threads. (default: 2048)
3517
3518 backgroundclosemaxqueue
3519
3520 The maximum number of opened file handles waiting to be closed
3521 in the background. This option only has an effect if background‐
3522 close is enabled. (default: 384)
3523
3524 backgroundclosethreadcount
3525
3526 Number of threads to process background file closes. Only rele‐
3527 vant if backgroundclose is enabled. (default: 4)
3528
3530 Bryan O'Sullivan <bos@serpentine.com>.
3531
3532 Mercurial was written by Olivia Mackall <olivia@selenic.com>.
3533
3535 hg(1), hgignore(5)
3536
3538 This manual page is copyright 2005 Bryan O'Sullivan. Mercurial is
3539 copyright 2005-2022 Olivia Mackall. Free use of this software is
3540 granted under the terms of the GNU General Public License version 2 or
3541 any later version.
3542
3544 Bryan O'Sullivan <bos@serpentine.com>
3545
3546 Organization: Mercurial
3547
3548
3549
3550
3551 HGRC(5)