##// END OF EJS Templates
help: fix config description of ui.reportoldssl
Mads Kiilerich -
r23121:7a3f715d stable
parent child Browse files
Show More
@@ -1,1710 +1,1710 b''
1 1 The Mercurial system uses a set of configuration files to control
2 2 aspects of its behavior.
3 3
4 4 The configuration files use a simple ini-file format. A configuration
5 5 file consists of sections, led by a ``[section]`` header and followed
6 6 by ``name = value`` entries::
7 7
8 8 [ui]
9 9 username = Firstname Lastname <firstname.lastname@example.net>
10 10 verbose = True
11 11
12 12 The above entries will be referred to as ``ui.username`` and
13 13 ``ui.verbose``, respectively. See the Syntax section below.
14 14
15 15 Files
16 16 =====
17 17
18 18 Mercurial reads configuration data from several files, if they exist.
19 19 These files do not exist by default and you will have to create the
20 20 appropriate configuration files yourself: global configuration like
21 21 the username setting is typically put into
22 22 ``%USERPROFILE%\mercurial.ini`` or ``$HOME/.hgrc`` and local
23 23 configuration is put into the per-repository ``<repo>/.hg/hgrc`` file.
24 24
25 25 The names of these files depend on the system on which Mercurial is
26 26 installed. ``*.rc`` files from a single directory are read in
27 27 alphabetical order, later ones overriding earlier ones. Where multiple
28 28 paths are given below, settings from earlier paths override later
29 29 ones.
30 30
31 31 .. container:: verbose.unix
32 32
33 33 On Unix, the following files are consulted:
34 34
35 35 - ``<repo>/.hg/hgrc`` (per-repository)
36 36 - ``$HOME/.hgrc`` (per-user)
37 37 - ``<install-root>/etc/mercurial/hgrc`` (per-installation)
38 38 - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation)
39 39 - ``/etc/mercurial/hgrc`` (per-system)
40 40 - ``/etc/mercurial/hgrc.d/*.rc`` (per-system)
41 41
42 42 .. container:: verbose.windows
43 43
44 44 On Windows, the following files are consulted:
45 45
46 46 - ``<repo>/.hg/hgrc`` (per-repository)
47 47 - ``%USERPROFILE%\.hgrc`` (per-user)
48 48 - ``%USERPROFILE%\Mercurial.ini`` (per-user)
49 49 - ``%HOME%\.hgrc`` (per-user)
50 50 - ``%HOME%\Mercurial.ini`` (per-user)
51 51 - ``<install-dir>\Mercurial.ini`` (per-installation)
52 52 - ``<install-dir>\hgrc.d\*.rc`` (per-installation)
53 53 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation)
54 54
55 55 .. note::
56 56
57 57 The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
58 58 is used when running 32-bit Python on 64-bit Windows.
59 59
60 60 .. container:: verbose.plan9
61 61
62 62 On Plan9, the following files are consulted:
63 63
64 64 - ``<repo>/.hg/hgrc`` (per-repository)
65 65 - ``$home/lib/hgrc`` (per-user)
66 66 - ``<install-root>/lib/mercurial/hgrc`` (per-installation)
67 67 - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation)
68 68 - ``/lib/mercurial/hgrc`` (per-system)
69 69 - ``/lib/mercurial/hgrc.d/*.rc`` (per-system)
70 70
71 71 Per-repository configuration options only apply in a
72 72 particular repository. This file is not version-controlled, and
73 73 will not get transferred during a "clone" operation. Options in
74 74 this file override options in all other configuration files. On
75 75 Plan 9 and Unix, most of this file will be ignored if it doesn't
76 76 belong to a trusted user or to a trusted group. See the documentation
77 77 for the ``[trusted]`` section below for more details.
78 78
79 79 Per-user configuration file(s) are for the user running Mercurial. On
80 80 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
81 81 files apply to all Mercurial commands executed by this user in any
82 82 directory. Options in these files override per-system and per-installation
83 83 options.
84 84
85 85 Per-installation configuration files are searched for in the
86 86 directory where Mercurial is installed. ``<install-root>`` is the
87 87 parent directory of the **hg** executable (or symlink) being run. For
88 88 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
89 89 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
90 90 to all Mercurial commands executed by any user in any directory.
91 91
92 92 Per-installation configuration files are for the system on
93 93 which Mercurial is running. Options in these files apply to all
94 94 Mercurial commands executed by any user in any directory. Registry
95 95 keys contain PATH-like strings, every part of which must reference
96 96 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
97 97 be read. Mercurial checks each of these locations in the specified
98 98 order until one or more configuration files are detected.
99 99
100 100 Per-system configuration files are for the system on which Mercurial
101 101 is running. Options in these files apply to all Mercurial commands
102 102 executed by any user in any directory. Options in these files
103 103 override per-installation options.
104 104
105 105 Syntax
106 106 ======
107 107
108 108 A configuration file consists of sections, led by a ``[section]`` header
109 109 and followed by ``name = value`` entries (sometimes called
110 110 ``configuration keys``)::
111 111
112 112 [spam]
113 113 eggs=ham
114 114 green=
115 115 eggs
116 116
117 117 Each line contains one entry. If the lines that follow are indented,
118 118 they are treated as continuations of that entry. Leading whitespace is
119 119 removed from values. Empty lines are skipped. Lines beginning with
120 120 ``#`` or ``;`` are ignored and may be used to provide comments.
121 121
122 122 Configuration keys can be set multiple times, in which case Mercurial
123 123 will use the value that was configured last. As an example::
124 124
125 125 [spam]
126 126 eggs=large
127 127 ham=serrano
128 128 eggs=small
129 129
130 130 This would set the configuration key named ``eggs`` to ``small``.
131 131
132 132 It is also possible to define a section multiple times. A section can
133 133 be redefined on the same and/or on different configuration files. For
134 134 example::
135 135
136 136 [foo]
137 137 eggs=large
138 138 ham=serrano
139 139 eggs=small
140 140
141 141 [bar]
142 142 eggs=ham
143 143 green=
144 144 eggs
145 145
146 146 [foo]
147 147 ham=prosciutto
148 148 eggs=medium
149 149 bread=toasted
150 150
151 151 This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
152 152 of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
153 153 respectively. As you can see there only thing that matters is the last
154 154 value that was set for each of the configuration keys.
155 155
156 156 If a configuration key is set multiple times in different
157 157 configuration files the final value will depend on the order in which
158 158 the different configuration files are read, with settings from earlier
159 159 paths overriding later ones as described on the ``Files`` section
160 160 above.
161 161
162 162 A line of the form ``%include file`` will include ``file`` into the
163 163 current configuration file. The inclusion is recursive, which means
164 164 that included files can include other files. Filenames are relative to
165 165 the configuration file in which the ``%include`` directive is found.
166 166 Environment variables and ``~user`` constructs are expanded in
167 167 ``file``. This lets you do something like::
168 168
169 169 %include ~/.hgrc.d/$HOST.rc
170 170
171 171 to include a different configuration file on each computer you use.
172 172
173 173 A line with ``%unset name`` will remove ``name`` from the current
174 174 section, if it has been set previously.
175 175
176 176 The values are either free-form text strings, lists of text strings,
177 177 or Boolean values. Boolean values can be set to true using any of "1",
178 178 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
179 179 (all case insensitive).
180 180
181 181 List values are separated by whitespace or comma, except when values are
182 182 placed in double quotation marks::
183 183
184 184 allow_read = "John Doe, PhD", brian, betty
185 185
186 186 Quotation marks can be escaped by prefixing them with a backslash. Only
187 187 quotation marks at the beginning of a word is counted as a quotation
188 188 (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``).
189 189
190 190 Sections
191 191 ========
192 192
193 193 This section describes the different sections that may appear in a
194 194 Mercurial configuration file, the purpose of each section, its possible
195 195 keys, and their possible values.
196 196
197 197 ``alias``
198 198 ---------
199 199
200 200 Defines command aliases.
201 201 Aliases allow you to define your own commands in terms of other
202 202 commands (or aliases), optionally including arguments. Positional
203 203 arguments in the form of ``$1``, ``$2``, etc in the alias definition
204 204 are expanded by Mercurial before execution. Positional arguments not
205 205 already used by ``$N`` in the definition are put at the end of the
206 206 command to be executed.
207 207
208 208 Alias definitions consist of lines of the form::
209 209
210 210 <alias> = <command> [<argument>]...
211 211
212 212 For example, this definition::
213 213
214 214 latest = log --limit 5
215 215
216 216 creates a new command ``latest`` that shows only the five most recent
217 217 changesets. You can define subsequent aliases using earlier ones::
218 218
219 219 stable5 = latest -b stable
220 220
221 221 .. note::
222 222
223 223 It is possible to create aliases with the same names as
224 224 existing commands, which will then override the original
225 225 definitions. This is almost always a bad idea!
226 226
227 227 An alias can start with an exclamation point (``!``) to make it a
228 228 shell alias. A shell alias is executed with the shell and will let you
229 229 run arbitrary commands. As an example, ::
230 230
231 231 echo = !echo $@
232 232
233 233 will let you do ``hg echo foo`` to have ``foo`` printed in your
234 234 terminal. A better example might be::
235 235
236 236 purge = !$HG status --no-status --unknown -0 | xargs -0 rm
237 237
238 238 which will make ``hg purge`` delete all unknown files in the
239 239 repository in the same manner as the purge extension.
240 240
241 241 Positional arguments like ``$1``, ``$2``, etc. in the alias definition
242 242 expand to the command arguments. Unmatched arguments are
243 243 removed. ``$0`` expands to the alias name and ``$@`` expands to all
244 244 arguments separated by a space. ``"$@"`` (with quotes) expands to all
245 245 arguments quoted individually and separated by a space. These expansions
246 246 happen before the command is passed to the shell.
247 247
248 248 Shell aliases are executed in an environment where ``$HG`` expands to
249 249 the path of the Mercurial that was used to execute the alias. This is
250 250 useful when you want to call further Mercurial commands in a shell
251 251 alias, as was done above for the purge alias. In addition,
252 252 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
253 253 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
254 254
255 255 .. note::
256 256
257 257 Some global configuration options such as ``-R`` are
258 258 processed before shell aliases and will thus not be passed to
259 259 aliases.
260 260
261 261
262 262 ``annotate``
263 263 ------------
264 264
265 265 Settings used when displaying file annotations. All values are
266 266 Booleans and default to False. See ``diff`` section for related
267 267 options for the diff command.
268 268
269 269 ``ignorews``
270 270 Ignore white space when comparing lines.
271 271
272 272 ``ignorewsamount``
273 273 Ignore changes in the amount of white space.
274 274
275 275 ``ignoreblanklines``
276 276 Ignore changes whose lines are all blank.
277 277
278 278
279 279 ``auth``
280 280 --------
281 281
282 282 Authentication credentials for HTTP authentication. This section
283 283 allows you to store usernames and passwords for use when logging
284 284 *into* HTTP servers. See the ``[web]`` configuration section if
285 285 you want to configure *who* can login to your HTTP server.
286 286
287 287 Each line has the following format::
288 288
289 289 <name>.<argument> = <value>
290 290
291 291 where ``<name>`` is used to group arguments into authentication
292 292 entries. Example::
293 293
294 294 foo.prefix = hg.intevation.org/mercurial
295 295 foo.username = foo
296 296 foo.password = bar
297 297 foo.schemes = http https
298 298
299 299 bar.prefix = secure.example.org
300 300 bar.key = path/to/file.key
301 301 bar.cert = path/to/file.cert
302 302 bar.schemes = https
303 303
304 304 Supported arguments:
305 305
306 306 ``prefix``
307 307 Either ``*`` or a URI prefix with or without the scheme part.
308 308 The authentication entry with the longest matching prefix is used
309 309 (where ``*`` matches everything and counts as a match of length
310 310 1). If the prefix doesn't include a scheme, the match is performed
311 311 against the URI with its scheme stripped as well, and the schemes
312 312 argument, q.v., is then subsequently consulted.
313 313
314 314 ``username``
315 315 Optional. Username to authenticate with. If not given, and the
316 316 remote site requires basic or digest authentication, the user will
317 317 be prompted for it. Environment variables are expanded in the
318 318 username letting you do ``foo.username = $USER``. If the URI
319 319 includes a username, only ``[auth]`` entries with a matching
320 320 username or without a username will be considered.
321 321
322 322 ``password``
323 323 Optional. Password to authenticate with. If not given, and the
324 324 remote site requires basic or digest authentication, the user
325 325 will be prompted for it.
326 326
327 327 ``key``
328 328 Optional. PEM encoded client certificate key file. Environment
329 329 variables are expanded in the filename.
330 330
331 331 ``cert``
332 332 Optional. PEM encoded client certificate chain file. Environment
333 333 variables are expanded in the filename.
334 334
335 335 ``schemes``
336 336 Optional. Space separated list of URI schemes to use this
337 337 authentication entry with. Only used if the prefix doesn't include
338 338 a scheme. Supported schemes are http and https. They will match
339 339 static-http and static-https respectively, as well.
340 340 Default: https.
341 341
342 342 If no suitable authentication entry is found, the user is prompted
343 343 for credentials as usual if required by the remote.
344 344
345 345
346 346 ``committemplate``
347 347 ------------------
348 348
349 349 ``changeset`` configuration in this section is used as the template to
350 350 customize the text shown in the editor when committing.
351 351
352 352 In addition to pre-defined template keywords, commit log specific one
353 353 below can be used for customization:
354 354
355 355 ``extramsg``
356 356 String: Extra message (typically 'Leave message empty to abort
357 357 commit.'). This may be changed by some commands or extensions.
358 358
359 359 For example, the template configuration below shows as same text as
360 360 one shown by default::
361 361
362 362 [committemplate]
363 363 changeset = {desc}\n\n
364 364 HG: Enter commit message. Lines beginning with 'HG:' are removed.
365 365 HG: {extramsg}
366 366 HG: --
367 367 HG: user: {author}\n{ifeq(p2rev, "-1", "",
368 368 "HG: branch merge\n")
369 369 }HG: branch '{branch}'\n{if(currentbookmark,
370 370 "HG: bookmark '{currentbookmark}'\n") }{subrepos %
371 371 "HG: subrepo {subrepo}\n" }{file_adds %
372 372 "HG: added {file}\n" }{file_mods %
373 373 "HG: changed {file}\n" }{file_dels %
374 374 "HG: removed {file}\n" }{if(files, "",
375 375 "HG: no files changed\n")}
376 376
377 377 .. note::
378 378
379 379 For some problematic encodings (see :hg:`help win32mbcs` for
380 380 detail), this customization should be configured carefully, to
381 381 avoid showing broken characters.
382 382
383 383 For example, if multibyte character ending with backslash (0x5c) is
384 384 followed by ASCII character 'n' in the customized template,
385 385 sequence of backslash and 'n' is treated as line-feed unexpectedly
386 386 (and multibyte character is broken, too).
387 387
388 388 Customized template is used for commands below (``--edit`` may be
389 389 required):
390 390
391 391 - :hg:`backout`
392 392 - :hg:`commit`
393 393 - :hg:`fetch` (for merge commit only)
394 394 - :hg:`graft`
395 395 - :hg:`histedit`
396 396 - :hg:`import`
397 397 - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh`
398 398 - :hg:`rebase`
399 399 - :hg:`shelve`
400 400 - :hg:`sign`
401 401 - :hg:`tag`
402 402 - :hg:`transplant`
403 403
404 404 Configuring items below instead of ``changeset`` allows showing
405 405 customized message only for specific actions, or showing different
406 406 messages for each action.
407 407
408 408 - ``changeset.backout`` for :hg:`backout`
409 409 - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges
410 410 - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other
411 411 - ``changeset.commit.normal.merge`` for :hg:`commit` on merges
412 412 - ``changeset.commit.normal.normal`` for :hg:`commit` on other
413 413 - ``changeset.fetch`` for :hg:`fetch` (impling merge commit)
414 414 - ``changeset.gpg.sign`` for :hg:`sign`
415 415 - ``changeset.graft`` for :hg:`graft`
416 416 - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit`
417 417 - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit`
418 418 - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit`
419 419 - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit`
420 420 - ``changeset.import.bypass`` for :hg:`import --bypass`
421 421 - ``changeset.import.normal.merge`` for :hg:`import` on merges
422 422 - ``changeset.import.normal.normal`` for :hg:`import` on other
423 423 - ``changeset.mq.qnew`` for :hg:`qnew`
424 424 - ``changeset.mq.qfold`` for :hg:`qfold`
425 425 - ``changeset.mq.qrefresh`` for :hg:`qrefresh`
426 426 - ``changeset.rebase.collapse`` for :hg:`rebase --collapse`
427 427 - ``changeset.rebase.merge`` for :hg:`rebase` on merges
428 428 - ``changeset.rebase.normal`` for :hg:`rebase` on other
429 429 - ``changeset.shelve.shelve`` for :hg:`shelve`
430 430 - ``changeset.tag.add`` for :hg:`tag` without ``--remove``
431 431 - ``changeset.tag.remove`` for :hg:`tag --remove`
432 432 - ``changeset.transplant.merge`` for :hg:`transplant` on merges
433 433 - ``changeset.transplant.normal`` for :hg:`transplant` on other
434 434
435 435 These dot-separated lists of names are treated as hierarchical ones.
436 436 For example, ``changeset.tag.remove`` customizes the commit message
437 437 only for :hg:`tag --remove`, but ``changeset.tag`` customizes the
438 438 commit message for :hg:`tag` regardless of ``--remove`` option.
439 439
440 440 At the external editor invocation for committing, corresponding
441 441 dot-separated list of names without ``changeset.`` prefix
442 442 (e.g. ``commit.normal.normal``) is in ``HGEDITFORM`` environment variable.
443 443
444 444 In this section, items other than ``changeset`` can be referred from
445 445 others. For example, the configuration to list committed files up
446 446 below can be referred as ``{listupfiles}``::
447 447
448 448 [committemplate]
449 449 listupfiles = {file_adds %
450 450 "HG: added {file}\n" }{file_mods %
451 451 "HG: changed {file}\n" }{file_dels %
452 452 "HG: removed {file}\n" }{if(files, "",
453 453 "HG: no files changed\n")}
454 454
455 455 ``decode/encode``
456 456 -----------------
457 457
458 458 Filters for transforming files on checkout/checkin. This would
459 459 typically be used for newline processing or other
460 460 localization/canonicalization of files.
461 461
462 462 Filters consist of a filter pattern followed by a filter command.
463 463 Filter patterns are globs by default, rooted at the repository root.
464 464 For example, to match any file ending in ``.txt`` in the root
465 465 directory only, use the pattern ``*.txt``. To match any file ending
466 466 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
467 467 For each file only the first matching filter applies.
468 468
469 469 The filter command can start with a specifier, either ``pipe:`` or
470 470 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
471 471
472 472 A ``pipe:`` command must accept data on stdin and return the transformed
473 473 data on stdout.
474 474
475 475 Pipe example::
476 476
477 477 [encode]
478 478 # uncompress gzip files on checkin to improve delta compression
479 479 # note: not necessarily a good idea, just an example
480 480 *.gz = pipe: gunzip
481 481
482 482 [decode]
483 483 # recompress gzip files when writing them to the working dir (we
484 484 # can safely omit "pipe:", because it's the default)
485 485 *.gz = gzip
486 486
487 487 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
488 488 with the name of a temporary file that contains the data to be
489 489 filtered by the command. The string ``OUTFILE`` is replaced with the name
490 490 of an empty temporary file, where the filtered data must be written by
491 491 the command.
492 492
493 493 .. note::
494 494
495 495 The tempfile mechanism is recommended for Windows systems,
496 496 where the standard shell I/O redirection operators often have
497 497 strange effects and may corrupt the contents of your files.
498 498
499 499 This filter mechanism is used internally by the ``eol`` extension to
500 500 translate line ending characters between Windows (CRLF) and Unix (LF)
501 501 format. We suggest you use the ``eol`` extension for convenience.
502 502
503 503
504 504 ``defaults``
505 505 ------------
506 506
507 507 (defaults are deprecated. Don't use them. Use aliases instead)
508 508
509 509 Use the ``[defaults]`` section to define command defaults, i.e. the
510 510 default options/arguments to pass to the specified commands.
511 511
512 512 The following example makes :hg:`log` run in verbose mode, and
513 513 :hg:`status` show only the modified files, by default::
514 514
515 515 [defaults]
516 516 log = -v
517 517 status = -m
518 518
519 519 The actual commands, instead of their aliases, must be used when
520 520 defining command defaults. The command defaults will also be applied
521 521 to the aliases of the commands defined.
522 522
523 523
524 524 ``diff``
525 525 --------
526 526
527 527 Settings used when displaying diffs. Everything except for ``unified``
528 528 is a Boolean and defaults to False. See ``annotate`` section for
529 529 related options for the annotate command.
530 530
531 531 ``git``
532 532 Use git extended diff format.
533 533
534 534 ``nobinary``
535 535 Omit git binary patches.
536 536
537 537 ``nodates``
538 538 Don't include dates in diff headers.
539 539
540 540 ``showfunc``
541 541 Show which function each change is in.
542 542
543 543 ``ignorews``
544 544 Ignore white space when comparing lines.
545 545
546 546 ``ignorewsamount``
547 547 Ignore changes in the amount of white space.
548 548
549 549 ``ignoreblanklines``
550 550 Ignore changes whose lines are all blank.
551 551
552 552 ``unified``
553 553 Number of lines of context to show.
554 554
555 555 ``email``
556 556 ---------
557 557
558 558 Settings for extensions that send email messages.
559 559
560 560 ``from``
561 561 Optional. Email address to use in "From" header and SMTP envelope
562 562 of outgoing messages.
563 563
564 564 ``to``
565 565 Optional. Comma-separated list of recipients' email addresses.
566 566
567 567 ``cc``
568 568 Optional. Comma-separated list of carbon copy recipients'
569 569 email addresses.
570 570
571 571 ``bcc``
572 572 Optional. Comma-separated list of blind carbon copy recipients'
573 573 email addresses.
574 574
575 575 ``method``
576 576 Optional. Method to use to send email messages. If value is ``smtp``
577 577 (default), use SMTP (see the ``[smtp]`` section for configuration).
578 578 Otherwise, use as name of program to run that acts like sendmail
579 579 (takes ``-f`` option for sender, list of recipients on command line,
580 580 message on stdin). Normally, setting this to ``sendmail`` or
581 581 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
582 582
583 583 ``charsets``
584 584 Optional. Comma-separated list of character sets considered
585 585 convenient for recipients. Addresses, headers, and parts not
586 586 containing patches of outgoing messages will be encoded in the
587 587 first character set to which conversion from local encoding
588 588 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
589 589 conversion fails, the text in question is sent as is. Defaults to
590 590 empty (explicit) list.
591 591
592 592 Order of outgoing email character sets:
593 593
594 594 1. ``us-ascii``: always first, regardless of settings
595 595 2. ``email.charsets``: in order given by user
596 596 3. ``ui.fallbackencoding``: if not in email.charsets
597 597 4. ``$HGENCODING``: if not in email.charsets
598 598 5. ``utf-8``: always last, regardless of settings
599 599
600 600 Email example::
601 601
602 602 [email]
603 603 from = Joseph User <joe.user@example.com>
604 604 method = /usr/sbin/sendmail
605 605 # charsets for western Europeans
606 606 # us-ascii, utf-8 omitted, as they are tried first and last
607 607 charsets = iso-8859-1, iso-8859-15, windows-1252
608 608
609 609
610 610 ``extensions``
611 611 --------------
612 612
613 613 Mercurial has an extension mechanism for adding new features. To
614 614 enable an extension, create an entry for it in this section.
615 615
616 616 If you know that the extension is already in Python's search path,
617 617 you can give the name of the module, followed by ``=``, with nothing
618 618 after the ``=``.
619 619
620 620 Otherwise, give a name that you choose, followed by ``=``, followed by
621 621 the path to the ``.py`` file (including the file name extension) that
622 622 defines the extension.
623 623
624 624 To explicitly disable an extension that is enabled in an hgrc of
625 625 broader scope, prepend its path with ``!``, as in ``foo = !/ext/path``
626 626 or ``foo = !`` when path is not supplied.
627 627
628 628 Example for ``~/.hgrc``::
629 629
630 630 [extensions]
631 631 # (the progress extension will get loaded from Mercurial's path)
632 632 progress =
633 633 # (this extension will get loaded from the file specified)
634 634 myfeature = ~/.hgext/myfeature.py
635 635
636 636
637 637 ``format``
638 638 ----------
639 639
640 640 ``usestore``
641 641 Enable or disable the "store" repository format which improves
642 642 compatibility with systems that fold case or otherwise mangle
643 643 filenames. Enabled by default. Disabling this option will allow
644 644 you to store longer filenames in some situations at the expense of
645 645 compatibility and ensures that the on-disk format of newly created
646 646 repositories will be compatible with Mercurial before version 0.9.4.
647 647
648 648 ``usefncache``
649 649 Enable or disable the "fncache" repository format which enhances
650 650 the "store" repository format (which has to be enabled to use
651 651 fncache) to allow longer filenames and avoids using Windows
652 652 reserved names, e.g. "nul". Enabled by default. Disabling this
653 653 option ensures that the on-disk format of newly created
654 654 repositories will be compatible with Mercurial before version 1.1.
655 655
656 656 ``dotencode``
657 657 Enable or disable the "dotencode" repository format which enhances
658 658 the "fncache" repository format (which has to be enabled to use
659 659 dotencode) to avoid issues with filenames starting with ._ on
660 660 Mac OS X and spaces on Windows. Enabled by default. Disabling this
661 661 option ensures that the on-disk format of newly created
662 662 repositories will be compatible with Mercurial before version 1.7.
663 663
664 664 ``graph``
665 665 ---------
666 666
667 667 Web graph view configuration. This section let you change graph
668 668 elements display properties by branches, for instance to make the
669 669 ``default`` branch stand out.
670 670
671 671 Each line has the following format::
672 672
673 673 <branch>.<argument> = <value>
674 674
675 675 where ``<branch>`` is the name of the branch being
676 676 customized. Example::
677 677
678 678 [graph]
679 679 # 2px width
680 680 default.width = 2
681 681 # red color
682 682 default.color = FF0000
683 683
684 684 Supported arguments:
685 685
686 686 ``width``
687 687 Set branch edges width in pixels.
688 688
689 689 ``color``
690 690 Set branch edges color in hexadecimal RGB notation.
691 691
692 692 ``hooks``
693 693 ---------
694 694
695 695 Commands or Python functions that get automatically executed by
696 696 various actions such as starting or finishing a commit. Multiple
697 697 hooks can be run for the same action by appending a suffix to the
698 698 action. Overriding a site-wide hook can be done by changing its
699 699 value or setting it to an empty string. Hooks can be prioritized
700 700 by adding a prefix of ``priority`` to the hook name on a new line
701 701 and setting the priority. The default priority is 0 if
702 702 not specified.
703 703
704 704 Example ``.hg/hgrc``::
705 705
706 706 [hooks]
707 707 # update working directory after adding changesets
708 708 changegroup.update = hg update
709 709 # do not use the site-wide hook
710 710 incoming =
711 711 incoming.email = /my/email/hook
712 712 incoming.autobuild = /my/build/hook
713 713 # force autobuild hook to run before other incoming hooks
714 714 priority.incoming.autobuild = 1
715 715
716 716 Most hooks are run with environment variables set that give useful
717 717 additional information. For each hook below, the environment
718 718 variables it is passed are listed with names of the form ``$HG_foo``.
719 719
720 720 ``changegroup``
721 721 Run after a changegroup has been added via push, pull or unbundle.
722 722 ID of the first new changeset is in ``$HG_NODE``. URL from which
723 723 changes came is in ``$HG_URL``.
724 724
725 725 ``commit``
726 726 Run after a changeset has been created in the local repository. ID
727 727 of the newly created changeset is in ``$HG_NODE``. Parent changeset
728 728 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
729 729
730 730 ``incoming``
731 731 Run after a changeset has been pulled, pushed, or unbundled into
732 732 the local repository. The ID of the newly arrived changeset is in
733 733 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
734 734
735 735 ``outgoing``
736 736 Run after sending changes from local repository to another. ID of
737 737 first changeset sent is in ``$HG_NODE``. Source of operation is in
738 738 ``$HG_SOURCE``; see "preoutgoing" hook for description.
739 739
740 740 ``post-<command>``
741 741 Run after successful invocations of the associated command. The
742 742 contents of the command line are passed as ``$HG_ARGS`` and the result
743 743 code in ``$HG_RESULT``. Parsed command line arguments are passed as
744 744 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
745 745 the python data internally passed to <command>. ``$HG_OPTS`` is a
746 746 dictionary of options (with unspecified options set to their defaults).
747 747 ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
748 748
749 749 ``pre-<command>``
750 750 Run before executing the associated command. The contents of the
751 751 command line are passed as ``$HG_ARGS``. Parsed command line arguments
752 752 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
753 753 representations of the data internally passed to <command>. ``$HG_OPTS``
754 754 is a dictionary of options (with unspecified options set to their
755 755 defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
756 756 failure, the command doesn't execute and Mercurial returns the failure
757 757 code.
758 758
759 759 ``prechangegroup``
760 760 Run before a changegroup is added via push, pull or unbundle. Exit
761 761 status 0 allows the changegroup to proceed. Non-zero status will
762 762 cause the push, pull or unbundle to fail. URL from which changes
763 763 will come is in ``$HG_URL``.
764 764
765 765 ``precommit``
766 766 Run before starting a local commit. Exit status 0 allows the
767 767 commit to proceed. Non-zero status will cause the commit to fail.
768 768 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
769 769
770 770 ``prelistkeys``
771 771 Run before listing pushkeys (like bookmarks) in the
772 772 repository. Non-zero status will cause failure. The key namespace is
773 773 in ``$HG_NAMESPACE``.
774 774
775 775 ``preoutgoing``
776 776 Run before collecting changes to send from the local repository to
777 777 another. Non-zero status will cause failure. This lets you prevent
778 778 pull over HTTP or SSH. Also prevents against local pull, push
779 779 (outbound) or bundle commands, but not effective, since you can
780 780 just copy files instead then. Source of operation is in
781 781 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
782 782 SSH or HTTP repository. If "push", "pull" or "bundle", operation
783 783 is happening on behalf of repository on same system.
784 784
785 785 ``prepushkey``
786 786 Run before a pushkey (like a bookmark) is added to the
787 787 repository. Non-zero status will cause the key to be rejected. The
788 788 key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``,
789 789 the old value (if any) is in ``$HG_OLD``, and the new value is in
790 790 ``$HG_NEW``.
791 791
792 792 ``pretag``
793 793 Run before creating a tag. Exit status 0 allows the tag to be
794 794 created. Non-zero status will cause the tag to fail. ID of
795 795 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
796 796 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
797 797
798 798 ``pretxnchangegroup``
799 799 Run after a changegroup has been added via push, pull or unbundle,
800 800 but before the transaction has been committed. Changegroup is
801 801 visible to hook program. This lets you validate incoming changes
802 802 before accepting them. Passed the ID of the first new changeset in
803 803 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
804 804 status will cause the transaction to be rolled back and the push,
805 805 pull or unbundle will fail. URL that was source of changes is in
806 806 ``$HG_URL``.
807 807
808 808 ``pretxncommit``
809 809 Run after a changeset has been created but the transaction not yet
810 810 committed. Changeset is visible to hook program. This lets you
811 811 validate commit message and changes. Exit status 0 allows the
812 812 commit to proceed. Non-zero status will cause the transaction to
813 813 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
814 814 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
815 815
816 816 ``preupdate``
817 817 Run before updating the working directory. Exit status 0 allows
818 818 the update to proceed. Non-zero status will prevent the update.
819 819 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
820 820 of second new parent is in ``$HG_PARENT2``.
821 821
822 822 ``listkeys``
823 823 Run after listing pushkeys (like bookmarks) in the repository. The
824 824 key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a
825 825 dictionary containing the keys and values.
826 826
827 827 ``pushkey``
828 828 Run after a pushkey (like a bookmark) is added to the
829 829 repository. The key namespace is in ``$HG_NAMESPACE``, the key is in
830 830 ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new
831 831 value is in ``$HG_NEW``.
832 832
833 833 ``tag``
834 834 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
835 835 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
836 836 repository if ``$HG_LOCAL=0``.
837 837
838 838 ``update``
839 839 Run after updating the working directory. Changeset ID of first
840 840 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
841 841 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
842 842 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
843 843
844 844 .. note::
845 845
846 846 It is generally better to use standard hooks rather than the
847 847 generic pre- and post- command hooks as they are guaranteed to be
848 848 called in the appropriate contexts for influencing transactions.
849 849 Also, hooks like "commit" will be called in all contexts that
850 850 generate a commit (e.g. tag) and not just the commit command.
851 851
852 852 .. note::
853 853
854 854 Environment variables with empty values may not be passed to
855 855 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
856 856 will have an empty value under Unix-like platforms for non-merge
857 857 changesets, while it will not be available at all under Windows.
858 858
859 859 The syntax for Python hooks is as follows::
860 860
861 861 hookname = python:modulename.submodule.callable
862 862 hookname = python:/path/to/python/module.py:callable
863 863
864 864 Python hooks are run within the Mercurial process. Each hook is
865 865 called with at least three keyword arguments: a ui object (keyword
866 866 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
867 867 keyword that tells what kind of hook is used. Arguments listed as
868 868 environment variables above are passed as keyword arguments, with no
869 869 ``HG_`` prefix, and names in lower case.
870 870
871 871 If a Python hook returns a "true" value or raises an exception, this
872 872 is treated as a failure.
873 873
874 874
875 875 ``hostfingerprints``
876 876 --------------------
877 877
878 878 Fingerprints of the certificates of known HTTPS servers.
879 879 A HTTPS connection to a server with a fingerprint configured here will
880 880 only succeed if the servers certificate matches the fingerprint.
881 881 This is very similar to how ssh known hosts works.
882 882 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
883 883 The CA chain and web.cacerts is not used for servers with a fingerprint.
884 884
885 885 For example::
886 886
887 887 [hostfingerprints]
888 888 hg.intevation.org = fa:1f:d9:48:f1:e7:74:30:38:8d:d8:58:b6:94:b8:58:28:7d:8b:d0
889 889
890 890 This feature is only supported when using Python 2.6 or later.
891 891
892 892
893 893 ``http_proxy``
894 894 --------------
895 895
896 896 Used to access web-based Mercurial repositories through a HTTP
897 897 proxy.
898 898
899 899 ``host``
900 900 Host name and (optional) port of the proxy server, for example
901 901 "myproxy:8000".
902 902
903 903 ``no``
904 904 Optional. Comma-separated list of host names that should bypass
905 905 the proxy.
906 906
907 907 ``passwd``
908 908 Optional. Password to authenticate with at the proxy server.
909 909
910 910 ``user``
911 911 Optional. User name to authenticate with at the proxy server.
912 912
913 913 ``always``
914 914 Optional. Always use the proxy, even for localhost and any entries
915 915 in ``http_proxy.no``. True or False. Default: False.
916 916
917 917 ``merge-patterns``
918 918 ------------------
919 919
920 920 This section specifies merge tools to associate with particular file
921 921 patterns. Tools matched here will take precedence over the default
922 922 merge tool. Patterns are globs by default, rooted at the repository
923 923 root.
924 924
925 925 Example::
926 926
927 927 [merge-patterns]
928 928 **.c = kdiff3
929 929 **.jpg = myimgmerge
930 930
931 931 ``merge-tools``
932 932 ---------------
933 933
934 934 This section configures external merge tools to use for file-level
935 935 merges. This section has likely been preconfigured at install time.
936 936 Use :hg:`config merge-tools` to check the existing configuration.
937 937 Also see :hg:`help merge-tools` for more details.
938 938
939 939 Example ``~/.hgrc``::
940 940
941 941 [merge-tools]
942 942 # Override stock tool location
943 943 kdiff3.executable = ~/bin/kdiff3
944 944 # Specify command line
945 945 kdiff3.args = $base $local $other -o $output
946 946 # Give higher priority
947 947 kdiff3.priority = 1
948 948
949 949 # Changing the priority of preconfigured tool
950 950 vimdiff.priority = 0
951 951
952 952 # Define new tool
953 953 myHtmlTool.args = -m $local $other $base $output
954 954 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
955 955 myHtmlTool.priority = 1
956 956
957 957 Supported arguments:
958 958
959 959 ``priority``
960 960 The priority in which to evaluate this tool.
961 961 Default: 0.
962 962
963 963 ``executable``
964 964 Either just the name of the executable or its pathname. On Windows,
965 965 the path can use environment variables with ${ProgramFiles} syntax.
966 966 Default: the tool name.
967 967
968 968 ``args``
969 969 The arguments to pass to the tool executable. You can refer to the
970 970 files being merged as well as the output file through these
971 971 variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning
972 972 of ``$local`` and ``$other`` can vary depending on which action is being
973 973 performed. During and update or merge, ``$local`` represents the original
974 974 state of the file, while ``$other`` represents the commit you are updating
975 975 to or the commit you are merging with. During a rebase ``$local``
976 976 represents the destination of the rebase, and ``$other`` represents the
977 977 commit being rebased.
978 978 Default: ``$local $base $other``
979 979
980 980 ``premerge``
981 981 Attempt to run internal non-interactive 3-way merge tool before
982 982 launching external tool. Options are ``true``, ``false``, ``keep`` or
983 983 ``keep-merge3``. The ``keep`` option will leave markers in the file if the
984 984 premerge fails. The ``keep-merge3`` will do the same but include information
985 985 about the base of the merge in the marker (see internal :merge3 in
986 986 :hg:`help merge-tools`).
987 987 Default: True
988 988
989 989 ``binary``
990 990 This tool can merge binary files. Defaults to False, unless tool
991 991 was selected by file pattern match.
992 992
993 993 ``symlink``
994 994 This tool can merge symlinks. Defaults to False, even if tool was
995 995 selected by file pattern match.
996 996
997 997 ``check``
998 998 A list of merge success-checking options:
999 999
1000 1000 ``changed``
1001 1001 Ask whether merge was successful when the merged file shows no changes.
1002 1002 ``conflicts``
1003 1003 Check whether there are conflicts even though the tool reported success.
1004 1004 ``prompt``
1005 1005 Always prompt for merge success, regardless of success reported by tool.
1006 1006
1007 1007 ``fixeol``
1008 1008 Attempt to fix up EOL changes caused by the merge tool.
1009 1009 Default: False
1010 1010
1011 1011 ``gui``
1012 1012 This tool requires a graphical interface to run. Default: False
1013 1013
1014 1014 ``regkey``
1015 1015 Windows registry key which describes install location of this
1016 1016 tool. Mercurial will search for this key first under
1017 1017 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
1018 1018 Default: None
1019 1019
1020 1020 ``regkeyalt``
1021 1021 An alternate Windows registry key to try if the first key is not
1022 1022 found. The alternate key uses the same ``regname`` and ``regappend``
1023 1023 semantics of the primary key. The most common use for this key
1024 1024 is to search for 32bit applications on 64bit operating systems.
1025 1025 Default: None
1026 1026
1027 1027 ``regname``
1028 1028 Name of value to read from specified registry key. Defaults to the
1029 1029 unnamed (default) value.
1030 1030
1031 1031 ``regappend``
1032 1032 String to append to the value read from the registry, typically
1033 1033 the executable name of the tool.
1034 1034 Default: None
1035 1035
1036 1036
1037 1037 ``patch``
1038 1038 ---------
1039 1039
1040 1040 Settings used when applying patches, for instance through the 'import'
1041 1041 command or with Mercurial Queues extension.
1042 1042
1043 1043 ``eol``
1044 1044 When set to 'strict' patch content and patched files end of lines
1045 1045 are preserved. When set to ``lf`` or ``crlf``, both files end of
1046 1046 lines are ignored when patching and the result line endings are
1047 1047 normalized to either LF (Unix) or CRLF (Windows). When set to
1048 1048 ``auto``, end of lines are again ignored while patching but line
1049 1049 endings in patched files are normalized to their original setting
1050 1050 on a per-file basis. If target file does not exist or has no end
1051 1051 of line, patch line endings are preserved.
1052 1052 Default: strict.
1053 1053
1054 1054
1055 1055 ``paths``
1056 1056 ---------
1057 1057
1058 1058 Assigns symbolic names to repositories. The left side is the
1059 1059 symbolic name, and the right gives the directory or URL that is the
1060 1060 location of the repository. Default paths can be declared by setting
1061 1061 the following entries.
1062 1062
1063 1063 ``default``
1064 1064 Directory or URL to use when pulling if no source is specified.
1065 1065 Default is set to repository from which the current repository was
1066 1066 cloned.
1067 1067
1068 1068 ``default-push``
1069 1069 Optional. Directory or URL to use when pushing if no destination
1070 1070 is specified.
1071 1071
1072 1072 Custom paths can be defined by assigning the path to a name that later can be
1073 1073 used from the command line. Example::
1074 1074
1075 1075 [paths]
1076 1076 my_path = http://example.com/path
1077 1077
1078 1078 To push to the path defined in ``my_path`` run the command::
1079 1079
1080 1080 hg push my_path
1081 1081
1082 1082
1083 1083 ``phases``
1084 1084 ----------
1085 1085
1086 1086 Specifies default handling of phases. See :hg:`help phases` for more
1087 1087 information about working with phases.
1088 1088
1089 1089 ``publish``
1090 1090 Controls draft phase behavior when working as a server. When true,
1091 1091 pushed changesets are set to public in both client and server and
1092 1092 pulled or cloned changesets are set to public in the client.
1093 1093 Default: True
1094 1094
1095 1095 ``new-commit``
1096 1096 Phase of newly-created commits.
1097 1097 Default: draft
1098 1098
1099 1099 ``checksubrepos``
1100 1100 Check the phase of the current revision of each subrepository. Allowed
1101 1101 values are "ignore", "follow" and "abort". For settings other than
1102 1102 "ignore", the phase of the current revision of each subrepository is
1103 1103 checked before committing the parent repository. If any of those phases is
1104 1104 greater than the phase of the parent repository (e.g. if a subrepo is in a
1105 1105 "secret" phase while the parent repo is in "draft" phase), the commit is
1106 1106 either aborted (if checksubrepos is set to "abort") or the higher phase is
1107 1107 used for the parent repository commit (if set to "follow").
1108 1108 Default: "follow"
1109 1109
1110 1110
1111 1111 ``profiling``
1112 1112 -------------
1113 1113
1114 1114 Specifies profiling type, format, and file output. Two profilers are
1115 1115 supported: an instrumenting profiler (named ``ls``), and a sampling
1116 1116 profiler (named ``stat``).
1117 1117
1118 1118 In this section description, 'profiling data' stands for the raw data
1119 1119 collected during profiling, while 'profiling report' stands for a
1120 1120 statistical text report generated from the profiling data. The
1121 1121 profiling is done using lsprof.
1122 1122
1123 1123 ``type``
1124 1124 The type of profiler to use.
1125 1125 Default: ls.
1126 1126
1127 1127 ``ls``
1128 1128 Use Python's built-in instrumenting profiler. This profiler
1129 1129 works on all platforms, but each line number it reports is the
1130 1130 first line of a function. This restriction makes it difficult to
1131 1131 identify the expensive parts of a non-trivial function.
1132 1132 ``stat``
1133 1133 Use a third-party statistical profiler, statprof. This profiler
1134 1134 currently runs only on Unix systems, and is most useful for
1135 1135 profiling commands that run for longer than about 0.1 seconds.
1136 1136
1137 1137 ``format``
1138 1138 Profiling format. Specific to the ``ls`` instrumenting profiler.
1139 1139 Default: text.
1140 1140
1141 1141 ``text``
1142 1142 Generate a profiling report. When saving to a file, it should be
1143 1143 noted that only the report is saved, and the profiling data is
1144 1144 not kept.
1145 1145 ``kcachegrind``
1146 1146 Format profiling data for kcachegrind use: when saving to a
1147 1147 file, the generated file can directly be loaded into
1148 1148 kcachegrind.
1149 1149
1150 1150 ``frequency``
1151 1151 Sampling frequency. Specific to the ``stat`` sampling profiler.
1152 1152 Default: 1000.
1153 1153
1154 1154 ``output``
1155 1155 File path where profiling data or report should be saved. If the
1156 1156 file exists, it is replaced. Default: None, data is printed on
1157 1157 stderr
1158 1158
1159 1159 ``sort``
1160 1160 Sort field. Specific to the ``ls`` instrumenting profiler.
1161 1161 One of ``callcount``, ``reccallcount``, ``totaltime`` and
1162 1162 ``inlinetime``.
1163 1163 Default: inlinetime.
1164 1164
1165 1165 ``limit``
1166 1166 Number of lines to show. Specific to the ``ls`` instrumenting profiler.
1167 1167 Default: 30.
1168 1168
1169 1169 ``nested``
1170 1170 Show at most this number of lines of drill-down info after each main entry.
1171 1171 This can help explain the difference between Total and Inline.
1172 1172 Specific to the ``ls`` instrumenting profiler.
1173 1173 Default: 5.
1174 1174
1175 1175 ``revsetalias``
1176 1176 ---------------
1177 1177
1178 1178 Alias definitions for revsets. See :hg:`help revsets` for details.
1179 1179
1180 1180 ``server``
1181 1181 ----------
1182 1182
1183 1183 Controls generic server settings.
1184 1184
1185 1185 ``uncompressed``
1186 1186 Whether to allow clients to clone a repository using the
1187 1187 uncompressed streaming protocol. This transfers about 40% more
1188 1188 data than a regular clone, but uses less memory and CPU on both
1189 1189 server and client. Over a LAN (100 Mbps or better) or a very fast
1190 1190 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
1191 1191 regular clone. Over most WAN connections (anything slower than
1192 1192 about 6 Mbps), uncompressed streaming is slower, because of the
1193 1193 extra data transfer overhead. This mode will also temporarily hold
1194 1194 the write lock while determining what data to transfer.
1195 1195 Default is True.
1196 1196
1197 1197 ``preferuncompressed``
1198 1198 When set, clients will try to use the uncompressed streaming
1199 1199 protocol. Default is False.
1200 1200
1201 1201 ``validate``
1202 1202 Whether to validate the completeness of pushed changesets by
1203 1203 checking that all new file revisions specified in manifests are
1204 1204 present. Default is False.
1205 1205
1206 1206 ``smtp``
1207 1207 --------
1208 1208
1209 1209 Configuration for extensions that need to send email messages.
1210 1210
1211 1211 ``host``
1212 1212 Host name of mail server, e.g. "mail.example.com".
1213 1213
1214 1214 ``port``
1215 1215 Optional. Port to connect to on mail server. Default: 465 (if
1216 1216 ``tls`` is smtps) or 25 (otherwise).
1217 1217
1218 1218 ``tls``
1219 1219 Optional. Method to enable TLS when connecting to mail server: starttls,
1220 1220 smtps or none. Default: none.
1221 1221
1222 1222 ``verifycert``
1223 1223 Optional. Verification for the certificate of mail server, when
1224 1224 ``tls`` is starttls or smtps. "strict", "loose" or False. For
1225 1225 "strict" or "loose", the certificate is verified as same as the
1226 1226 verification for HTTPS connections (see ``[hostfingerprints]`` and
1227 1227 ``[web] cacerts`` also). For "strict", sending email is also
1228 1228 aborted, if there is no configuration for mail server in
1229 1229 ``[hostfingerprints]`` and ``[web] cacerts``. --insecure for
1230 1230 :hg:`email` overwrites this as "loose". Default: "strict".
1231 1231
1232 1232 ``username``
1233 1233 Optional. User name for authenticating with the SMTP server.
1234 1234 Default: none.
1235 1235
1236 1236 ``password``
1237 1237 Optional. Password for authenticating with the SMTP server. If not
1238 1238 specified, interactive sessions will prompt the user for a
1239 1239 password; non-interactive sessions will fail. Default: none.
1240 1240
1241 1241 ``local_hostname``
1242 1242 Optional. It's the hostname that the sender can use to identify
1243 1243 itself to the MTA.
1244 1244
1245 1245
1246 1246 ``subpaths``
1247 1247 ------------
1248 1248
1249 1249 Subrepository source URLs can go stale if a remote server changes name
1250 1250 or becomes temporarily unavailable. This section lets you define
1251 1251 rewrite rules of the form::
1252 1252
1253 1253 <pattern> = <replacement>
1254 1254
1255 1255 where ``pattern`` is a regular expression matching a subrepository
1256 1256 source URL and ``replacement`` is the replacement string used to
1257 1257 rewrite it. Groups can be matched in ``pattern`` and referenced in
1258 1258 ``replacements``. For instance::
1259 1259
1260 1260 http://server/(.*)-hg/ = http://hg.server/\1/
1261 1261
1262 1262 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
1263 1263
1264 1264 Relative subrepository paths are first made absolute, and the
1265 1265 rewrite rules are then applied on the full (absolute) path. The rules
1266 1266 are applied in definition order.
1267 1267
1268 1268 ``trusted``
1269 1269 -----------
1270 1270
1271 1271 Mercurial will not use the settings in the
1272 1272 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
1273 1273 user or to a trusted group, as various hgrc features allow arbitrary
1274 1274 commands to be run. This issue is often encountered when configuring
1275 1275 hooks or extensions for shared repositories or servers. However,
1276 1276 the web interface will use some safe settings from the ``[web]``
1277 1277 section.
1278 1278
1279 1279 This section specifies what users and groups are trusted. The
1280 1280 current user is always trusted. To trust everybody, list a user or a
1281 1281 group with name ``*``. These settings must be placed in an
1282 1282 *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the
1283 1283 user or service running Mercurial.
1284 1284
1285 1285 ``users``
1286 1286 Comma-separated list of trusted users.
1287 1287
1288 1288 ``groups``
1289 1289 Comma-separated list of trusted groups.
1290 1290
1291 1291
1292 1292 ``ui``
1293 1293 ------
1294 1294
1295 1295 User interface controls.
1296 1296
1297 1297 ``archivemeta``
1298 1298 Whether to include the .hg_archival.txt file containing meta data
1299 1299 (hashes for the repository base and for tip) in archives created
1300 1300 by the :hg:`archive` command or downloaded via hgweb.
1301 1301 Default is True.
1302 1302
1303 1303 ``askusername``
1304 1304 Whether to prompt for a username when committing. If True, and
1305 1305 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
1306 1306 be prompted to enter a username. If no username is entered, the
1307 1307 default ``USER@HOST`` is used instead.
1308 1308 Default is False.
1309 1309
1310 1310 ``commitsubrepos``
1311 1311 Whether to commit modified subrepositories when committing the
1312 1312 parent repository. If False and one subrepository has uncommitted
1313 1313 changes, abort the commit.
1314 1314 Default is False.
1315 1315
1316 1316 ``debug``
1317 1317 Print debugging information. True or False. Default is False.
1318 1318
1319 1319 ``editor``
1320 1320 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
1321 1321
1322 1322 ``fallbackencoding``
1323 1323 Encoding to try if it's not possible to decode the changelog using
1324 1324 UTF-8. Default is ISO-8859-1.
1325 1325
1326 1326 ``ignore``
1327 1327 A file to read per-user ignore patterns from. This file should be
1328 1328 in the same format as a repository-wide .hgignore file. This
1329 1329 option supports hook syntax, so if you want to specify multiple
1330 1330 ignore files, you can do so by setting something like
1331 1331 ``ignore.other = ~/.hgignore2``. For details of the ignore file
1332 1332 format, see the ``hgignore(5)`` man page.
1333 1333
1334 1334 ``interactive``
1335 1335 Allow to prompt the user. True or False. Default is True.
1336 1336
1337 1337 ``logtemplate``
1338 1338 Template string for commands that print changesets.
1339 1339
1340 1340 ``merge``
1341 1341 The conflict resolution program to use during a manual merge.
1342 1342 For more information on merge tools see :hg:`help merge-tools`.
1343 1343 For configuring merge tools see the ``[merge-tools]`` section.
1344 1344
1345 1345 ``mergemarkers``
1346 1346 Sets the merge conflict marker label styling. The ``detailed``
1347 1347 style uses the ``mergemarkertemplate`` setting to style the labels.
1348 1348 The ``basic`` style just uses 'local' and 'other' as the marker label.
1349 1349 One of ``basic`` or ``detailed``.
1350 1350 Default is ``basic``.
1351 1351
1352 1352 ``mergemarkertemplate``
1353 1353 The template used to print the commit description next to each conflict
1354 1354 marker during merge conflicts. See :hg:`help templates` for the template
1355 1355 format.
1356 1356 Defaults to showing the hash, tags, branches, bookmarks, author, and
1357 1357 the first line of the commit description.
1358 1358 You have to pay attention to encodings of managed files, if you
1359 1359 use non-ASCII characters in tags, branches, bookmarks, author
1360 1360 and/or commit descriptions. At template expansion, non-ASCII
1361 1361 characters use the encoding specified by ``--encoding`` global
1362 1362 option, ``HGENCODING`` or other locale setting environment
1363 1363 variables. The difference of encoding between merged file and
1364 1364 conflict markers causes serious problem.
1365 1365
1366 1366 ``portablefilenames``
1367 1367 Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``.
1368 1368 Default is ``warn``.
1369 1369 If set to ``warn`` (or ``true``), a warning message is printed on POSIX
1370 1370 platforms, if a file with a non-portable filename is added (e.g. a file
1371 1371 with a name that can't be created on Windows because it contains reserved
1372 1372 parts like ``AUX``, reserved characters like ``:``, or would cause a case
1373 1373 collision with an existing file).
1374 1374 If set to ``ignore`` (or ``false``), no warning is printed.
1375 1375 If set to ``abort``, the command is aborted.
1376 1376 On Windows, this configuration option is ignored and the command aborted.
1377 1377
1378 1378 ``quiet``
1379 1379 Reduce the amount of output printed. True or False. Default is False.
1380 1380
1381 1381 ``remotecmd``
1382 1382 remote command to use for clone/push/pull operations. Default is ``hg``.
1383 1383
1384 1384 ``reportoldssl``
1385 Warn if an SSL certificate is unable to be due to using Python
1385 Warn if an SSL certificate is unable to be used due to using Python
1386 1386 2.5 or earlier. True or False. Default is True.
1387 1387
1388 1388 ``report_untrusted``
1389 1389 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
1390 1390 trusted user or group. True or False. Default is True.
1391 1391
1392 1392 ``slash``
1393 1393 Display paths using a slash (``/``) as the path separator. This
1394 1394 only makes a difference on systems where the default path
1395 1395 separator is not the slash character (e.g. Windows uses the
1396 1396 backslash character (``\``)).
1397 1397 Default is False.
1398 1398
1399 1399 ``ssh``
1400 1400 command to use for SSH connections. Default is ``ssh``.
1401 1401
1402 1402 ``strict``
1403 1403 Require exact command names, instead of allowing unambiguous
1404 1404 abbreviations. True or False. Default is False.
1405 1405
1406 1406 ``style``
1407 1407 Name of style to use for command output.
1408 1408
1409 1409 ``timeout``
1410 1410 The timeout used when a lock is held (in seconds), a negative value
1411 1411 means no timeout. Default is 600.
1412 1412
1413 1413 ``traceback``
1414 1414 Mercurial always prints a traceback when an unknown exception
1415 1415 occurs. Setting this to True will make Mercurial print a traceback
1416 1416 on all exceptions, even those recognized by Mercurial (such as
1417 1417 IOError or MemoryError). Default is False.
1418 1418
1419 1419 ``username``
1420 1420 The committer of a changeset created when running "commit".
1421 1421 Typically a person's name and email address, e.g. ``Fred Widget
1422 1422 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
1423 1423 the username in hgrc is empty, it has to be specified manually or
1424 1424 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
1425 1425 ``username =`` in the system hgrc). Environment variables in the
1426 1426 username are expanded.
1427 1427
1428 1428 ``verbose``
1429 1429 Increase the amount of output printed. True or False. Default is False.
1430 1430
1431 1431
1432 1432 ``web``
1433 1433 -------
1434 1434
1435 1435 Web interface configuration. The settings in this section apply to
1436 1436 both the builtin webserver (started by :hg:`serve`) and the script you
1437 1437 run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI
1438 1438 and WSGI).
1439 1439
1440 1440 The Mercurial webserver does no authentication (it does not prompt for
1441 1441 usernames and passwords to validate *who* users are), but it does do
1442 1442 authorization (it grants or denies access for *authenticated users*
1443 1443 based on settings in this section). You must either configure your
1444 1444 webserver to do authentication for you, or disable the authorization
1445 1445 checks.
1446 1446
1447 1447 For a quick setup in a trusted environment, e.g., a private LAN, where
1448 1448 you want it to accept pushes from anybody, you can use the following
1449 1449 command line::
1450 1450
1451 1451 $ hg --config web.allow_push=* --config web.push_ssl=False serve
1452 1452
1453 1453 Note that this will allow anybody to push anything to the server and
1454 1454 that this should not be used for public servers.
1455 1455
1456 1456 The full set of options is:
1457 1457
1458 1458 ``accesslog``
1459 1459 Where to output the access log. Default is stdout.
1460 1460
1461 1461 ``address``
1462 1462 Interface address to bind to. Default is all.
1463 1463
1464 1464 ``allow_archive``
1465 1465 List of archive format (bz2, gz, zip) allowed for downloading.
1466 1466 Default is empty.
1467 1467
1468 1468 ``allowbz2``
1469 1469 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
1470 1470 revisions.
1471 1471 Default is False.
1472 1472
1473 1473 ``allowgz``
1474 1474 (DEPRECATED) Whether to allow .tar.gz downloading of repository
1475 1475 revisions.
1476 1476 Default is False.
1477 1477
1478 1478 ``allowpull``
1479 1479 Whether to allow pulling from the repository. Default is True.
1480 1480
1481 1481 ``allow_push``
1482 1482 Whether to allow pushing to the repository. If empty or not set,
1483 1483 push is not allowed. If the special value ``*``, any remote user can
1484 1484 push, including unauthenticated users. Otherwise, the remote user
1485 1485 must have been authenticated, and the authenticated user name must
1486 1486 be present in this list. The contents of the allow_push list are
1487 1487 examined after the deny_push list.
1488 1488
1489 1489 ``allow_read``
1490 1490 If the user has not already been denied repository access due to
1491 1491 the contents of deny_read, this list determines whether to grant
1492 1492 repository access to the user. If this list is not empty, and the
1493 1493 user is unauthenticated or not present in the list, then access is
1494 1494 denied for the user. If the list is empty or not set, then access
1495 1495 is permitted to all users by default. Setting allow_read to the
1496 1496 special value ``*`` is equivalent to it not being set (i.e. access
1497 1497 is permitted to all users). The contents of the allow_read list are
1498 1498 examined after the deny_read list.
1499 1499
1500 1500 ``allowzip``
1501 1501 (DEPRECATED) Whether to allow .zip downloading of repository
1502 1502 revisions. Default is False. This feature creates temporary files.
1503 1503
1504 1504 ``archivesubrepos``
1505 1505 Whether to recurse into subrepositories when archiving. Default is
1506 1506 False.
1507 1507
1508 1508 ``baseurl``
1509 1509 Base URL to use when publishing URLs in other locations, so
1510 1510 third-party tools like email notification hooks can construct
1511 1511 URLs. Example: ``http://hgserver/repos/``.
1512 1512
1513 1513 ``cacerts``
1514 1514 Path to file containing a list of PEM encoded certificate
1515 1515 authority certificates. Environment variables and ``~user``
1516 1516 constructs are expanded in the filename. If specified on the
1517 1517 client, then it will verify the identity of remote HTTPS servers
1518 1518 with these certificates.
1519 1519
1520 1520 This feature is only supported when using Python 2.6 or later. If you wish
1521 1521 to use it with earlier versions of Python, install the backported
1522 1522 version of the ssl library that is available from
1523 1523 ``http://pypi.python.org``.
1524 1524
1525 1525 To disable SSL verification temporarily, specify ``--insecure`` from
1526 1526 command line.
1527 1527
1528 1528 You can use OpenSSL's CA certificate file if your platform has
1529 1529 one. On most Linux systems this will be
1530 1530 ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to
1531 1531 generate this file manually. The form must be as follows::
1532 1532
1533 1533 -----BEGIN CERTIFICATE-----
1534 1534 ... (certificate in base64 PEM encoding) ...
1535 1535 -----END CERTIFICATE-----
1536 1536 -----BEGIN CERTIFICATE-----
1537 1537 ... (certificate in base64 PEM encoding) ...
1538 1538 -----END CERTIFICATE-----
1539 1539
1540 1540 ``cache``
1541 1541 Whether to support caching in hgweb. Defaults to True.
1542 1542
1543 1543 ``collapse``
1544 1544 With ``descend`` enabled, repositories in subdirectories are shown at
1545 1545 a single level alongside repositories in the current path. With
1546 1546 ``collapse`` also enabled, repositories residing at a deeper level than
1547 1547 the current path are grouped behind navigable directory entries that
1548 1548 lead to the locations of these repositories. In effect, this setting
1549 1549 collapses each collection of repositories found within a subdirectory
1550 1550 into a single entry for that subdirectory. Default is False.
1551 1551
1552 1552 ``comparisoncontext``
1553 1553 Number of lines of context to show in side-by-side file comparison. If
1554 1554 negative or the value ``full``, whole files are shown. Default is 5.
1555 1555 This setting can be overridden by a ``context`` request parameter to the
1556 1556 ``comparison`` command, taking the same values.
1557 1557
1558 1558 ``contact``
1559 1559 Name or email address of the person in charge of the repository.
1560 1560 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
1561 1561
1562 1562 ``deny_push``
1563 1563 Whether to deny pushing to the repository. If empty or not set,
1564 1564 push is not denied. If the special value ``*``, all remote users are
1565 1565 denied push. Otherwise, unauthenticated users are all denied, and
1566 1566 any authenticated user name present in this list is also denied. The
1567 1567 contents of the deny_push list are examined before the allow_push list.
1568 1568
1569 1569 ``deny_read``
1570 1570 Whether to deny reading/viewing of the repository. If this list is
1571 1571 not empty, unauthenticated users are all denied, and any
1572 1572 authenticated user name present in this list is also denied access to
1573 1573 the repository. If set to the special value ``*``, all remote users
1574 1574 are denied access (rarely needed ;). If deny_read is empty or not set,
1575 1575 the determination of repository access depends on the presence and
1576 1576 content of the allow_read list (see description). If both
1577 1577 deny_read and allow_read are empty or not set, then access is
1578 1578 permitted to all users by default. If the repository is being
1579 1579 served via hgwebdir, denied users will not be able to see it in
1580 1580 the list of repositories. The contents of the deny_read list have
1581 1581 priority over (are examined before) the contents of the allow_read
1582 1582 list.
1583 1583
1584 1584 ``descend``
1585 1585 hgwebdir indexes will not descend into subdirectories. Only repositories
1586 1586 directly in the current path will be shown (other repositories are still
1587 1587 available from the index corresponding to their containing path).
1588 1588
1589 1589 ``description``
1590 1590 Textual description of the repository's purpose or contents.
1591 1591 Default is "unknown".
1592 1592
1593 1593 ``encoding``
1594 1594 Character encoding name. Default is the current locale charset.
1595 1595 Example: "UTF-8"
1596 1596
1597 1597 ``errorlog``
1598 1598 Where to output the error log. Default is stderr.
1599 1599
1600 1600 ``guessmime``
1601 1601 Control MIME types for raw download of file content.
1602 1602 Set to True to let hgweb guess the content type from the file
1603 1603 extension. This will serve HTML files as ``text/html`` and might
1604 1604 allow cross-site scripting attacks when serving untrusted
1605 1605 repositories. Default is False.
1606 1606
1607 1607 ``hidden``
1608 1608 Whether to hide the repository in the hgwebdir index.
1609 1609 Default is False.
1610 1610
1611 1611 ``ipv6``
1612 1612 Whether to use IPv6. Default is False.
1613 1613
1614 1614 ``logoimg``
1615 1615 File name of the logo image that some templates display on each page.
1616 1616 The file name is relative to ``staticurl``. That is, the full path to
1617 1617 the logo image is "staticurl/logoimg".
1618 1618 If unset, ``hglogo.png`` will be used.
1619 1619
1620 1620 ``logourl``
1621 1621 Base URL to use for logos. If unset, ``http://mercurial.selenic.com/``
1622 1622 will be used.
1623 1623
1624 1624 ``maxchanges``
1625 1625 Maximum number of changes to list on the changelog. Default is 10.
1626 1626
1627 1627 ``maxfiles``
1628 1628 Maximum number of files to list per changeset. Default is 10.
1629 1629
1630 1630 ``maxshortchanges``
1631 1631 Maximum number of changes to list on the shortlog, graph or filelog
1632 1632 pages. Default is 60.
1633 1633
1634 1634 ``name``
1635 1635 Repository name to use in the web interface. Default is current
1636 1636 working directory.
1637 1637
1638 1638 ``port``
1639 1639 Port to listen on. Default is 8000.
1640 1640
1641 1641 ``prefix``
1642 1642 Prefix path to serve from. Default is '' (server root).
1643 1643
1644 1644 ``push_ssl``
1645 1645 Whether to require that inbound pushes be transported over SSL to
1646 1646 prevent password sniffing. Default is True.
1647 1647
1648 1648 ``staticurl``
1649 1649 Base URL to use for static files. If unset, static files (e.g. the
1650 1650 hgicon.png favicon) will be served by the CGI script itself. Use
1651 1651 this setting to serve them directly with the HTTP server.
1652 1652 Example: ``http://hgserver/static/``.
1653 1653
1654 1654 ``stripes``
1655 1655 How many lines a "zebra stripe" should span in multi-line output.
1656 1656 Default is 1; set to 0 to disable.
1657 1657
1658 1658 ``style``
1659 1659 Which template map style to use. The available options are the names of
1660 1660 subdirectories in the HTML templates path. Default is ``paper``.
1661 1661 Example: ``monoblue``
1662 1662
1663 1663 ``templates``
1664 1664 Where to find the HTML templates. The default path to the HTML templates
1665 1665 can be obtained from ``hg debuginstall``.
1666 1666
1667 1667 ``websub``
1668 1668 ----------
1669 1669
1670 1670 Web substitution filter definition. You can use this section to
1671 1671 define a set of regular expression substitution patterns which
1672 1672 let you automatically modify the hgweb server output.
1673 1673
1674 1674 The default hgweb templates only apply these substitution patterns
1675 1675 on the revision description fields. You can apply them anywhere
1676 1676 you want when you create your own templates by adding calls to the
1677 1677 "websub" filter (usually after calling the "escape" filter).
1678 1678
1679 1679 This can be used, for example, to convert issue references to links
1680 1680 to your issue tracker, or to convert "markdown-like" syntax into
1681 1681 HTML (see the examples below).
1682 1682
1683 1683 Each entry in this section names a substitution filter.
1684 1684 The value of each entry defines the substitution expression itself.
1685 1685 The websub expressions follow the old interhg extension syntax,
1686 1686 which in turn imitates the Unix sed replacement syntax::
1687 1687
1688 1688 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
1689 1689
1690 1690 You can use any separator other than "/". The final "i" is optional
1691 1691 and indicates that the search must be case insensitive.
1692 1692
1693 1693 Examples::
1694 1694
1695 1695 [websub]
1696 1696 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
1697 1697 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
1698 1698 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
1699 1699
1700 1700 ``worker``
1701 1701 ----------
1702 1702
1703 1703 Parallel master/worker configuration. We currently perform working
1704 1704 directory updates in parallel on Unix-like systems, which greatly
1705 1705 helps performance.
1706 1706
1707 1707 ``numcpus``
1708 1708 Number of CPUs to use for parallel operations. Default is 4 or the
1709 1709 number of CPUs on the system, whichever is larger. A zero or
1710 1710 negative value is treated as ``use the default``.
General Comments 0
You need to be logged in to leave comments. Login now