1HGRC(5)                        Mercurial Manual                        HGRC(5)
2
3
4

NAME

6       hgrc - configuration files for Mercurial
7

DESCRIPTION

9       The  Mercurial  system uses a set of configuration files to control as‐
10       pects of its behavior.
11

TROUBLESHOOTING

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

STRUCTURE

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

FILES

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
85HKEY_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

SYNTAX

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

SECTIONS

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

AUTHOR

3413       Bryan O'Sullivan <bos@serpentine.com>.
3414
3415       Mercurial was written by Olivia Mackall <olivia@selenic.com>.
3416

SEE ALSO

3418       hg(1), hgignore(5)
3419

COPYING

3421       This manual page is copyright  2005  Bryan  O'Sullivan.   Mercurial  is
3422       copyright  2005-2021  Olivia  Mackall.   Free  use  of this software is
3423       granted under the terms of the GNU General Public License version 2  or
3424       any later version.
3425

AUTHOR

3427       Bryan O'Sullivan <bos@serpentine.com>
3428
3429       Organization: Mercurial
3430
3431
3432
3433
3434                                                                       HGRC(5)
Impressum