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