##// END OF EJS Templates
hgrc.5: mention lists as well
Martin Geisler -
r10980:30ae8174 stable
parent child Browse files
Show More
@@ -1,998 +1,998 b''
1 1 ======
2 2 hgrc
3 3 ======
4 4
5 5 ---------------------------------
6 6 configuration files for Mercurial
7 7 ---------------------------------
8 8
9 9 :Author: Bryan O'Sullivan <bos@serpentine.com>
10 10 :Organization: Mercurial
11 11 :Manual section: 5
12 12 :Manual group: Mercurial Manual
13 13
14 14 .. contents::
15 15 :backlinks: top
16 16 :class: htmlonly
17 17
18 18
19 19 Synopsis
20 20 --------
21 21
22 22 The Mercurial system uses a set of configuration files to control
23 23 aspects of its behavior.
24 24
25 25 Files
26 26 -----
27 27
28 28 Mercurial reads configuration data from several files, if they exist.
29 29 The names of these files depend on the system on which Mercurial is
30 30 installed. ``*.rc`` files from a single directory are read in
31 31 alphabetical order, later ones overriding earlier ones. Where multiple
32 32 paths are given below, settings from earlier paths override later
33 33 ones.
34 34
35 35 | (Unix, Windows) ``<repo>/.hg/hgrc``
36 36
37 37 Per-repository configuration options that only apply in a
38 38 particular repository. This file is not version-controlled, and
39 39 will not get transferred during a "clone" operation. Options in
40 40 this file override options in all other configuration files. On
41 41 Unix, most of this file will be ignored if it doesn't belong to a
42 42 trusted user or to a trusted group. See the documentation for the
43 43 trusted_ section below for more details.
44 44
45 45 | (Unix) ``$HOME/.hgrc``
46 46 | (Windows) ``%USERPROFILE%\.hgrc``
47 47 | (Windows) ``%USERPROFILE%\Mercurial.ini``
48 48 | (Windows) ``%HOME%\.hgrc``
49 49 | (Windows) ``%HOME%\Mercurial.ini``
50 50
51 51 Per-user configuration file(s), for the user running Mercurial. On
52 52 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
53 53 files apply to all Mercurial commands executed by this user in any
54 54 directory. Options in these files override per-system and per-installation
55 55 options.
56 56
57 57 | (Unix) ``/etc/mercurial/hgrc``
58 58 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
59 59
60 60 Per-system configuration files, for the system on which Mercurial
61 61 is running. Options in these files apply to all Mercurial commands
62 62 executed by any user in any directory. Options in these files
63 63 override per-installation options.
64 64
65 65 | (Unix) ``<install-root>/etc/mercurial/hgrc``
66 66 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
67 67
68 68 Per-installation configuration files, searched for in the
69 69 directory where Mercurial is installed. ``<install-root>`` is the
70 70 parent directory of the **hg** executable (or symlink) being run. For
71 71 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
72 72 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
73 73 to all Mercurial commands executed by any user in any directory.
74 74
75 75 | (Windows) ``<install-dir>\Mercurial.ini``
76 76 | (Windows) ``<install-dir>\hgrc.d\*.rc``
77 77 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
78 78
79 79 Per-installation/system configuration files, for the system on
80 80 which Mercurial is running. Options in these files apply to all
81 81 Mercurial commands executed by any user in any directory. Registry
82 82 keys contain PATH-like strings, every part of which must reference
83 83 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
84 84 be read. Mercurial checks each of these locations in the specified
85 85 order until one or more configuration files are detected. If the
86 86 pywin32 extensions are not installed, Mercurial will only look for
87 87 site-wide configuration in ``C:\Mercurial\Mercurial.ini``.
88 88
89 89 Syntax
90 90 ------
91 91
92 92 A configuration file consists of sections, led by a ``[section]`` header
93 93 and followed by ``name = value`` entries::
94 94
95 95 [spam]
96 96 eggs=ham
97 97 green=
98 98 eggs
99 99
100 100 Each line contains one entry. If the lines that follow are indented,
101 101 they are treated as continuations of that entry. Leading whitespace is
102 102 removed from values. Empty lines are skipped. Lines beginning with
103 103 ``#`` or ``;`` are ignored and may be used to provide comments.
104 104
105 105 A line of the form ``%include file`` will include ``file`` into the
106 106 current configuration file. The inclusion is recursive, which means
107 107 that included files can include other files. Filenames are relative to
108 108 the configuration file in which the ``%include`` directive is found.
109 109
110 110 A line with ``%unset name`` will remove ``name`` from the current
111 111 section, if it has been set previously.
112 112
113 The values are either free-form text strings or Boolean values.
114 Boolean values can be set to true using any of "1", "yes", "true", or
115 "on" and to false using "0", "no", "false", or "off" (all case
116 insensitive).
113 The values are either free-form text strings, lists of text strings,
114 or Boolean values. Lists are split on whitespace and commas. Boolean
115 values can be set to true using any of "1", "yes", "true", or "on" and
116 to false using "0", "no", "false", or "off" (all case insensitive).
117 117
118 118
119 119 Sections
120 120 --------
121 121
122 122 This section describes the different sections that may appear in a
123 123 Mercurial "hgrc" file, the purpose of each section, its possible keys,
124 124 and their possible values.
125 125
126 126 ``alias``
127 127 """""""""
128 128 Defines command aliases.
129 129 Aliases allow you to define your own commands in terms of other
130 130 commands (or aliases), optionally including arguments.
131 131
132 132 Alias definitions consist of lines of the form::
133 133
134 134 <alias> = <command> [<argument]...
135 135
136 136 For example, this definition::
137 137
138 138 latest = log --limit 5
139 139
140 140 creates a new command ``latest`` that shows only the five most recent
141 141 changesets. You can define subsequent aliases using earlier ones::
142 142
143 143 stable5 = latest -b stable
144 144
145 145 .. note:: It is possible to create aliases with the same names as
146 146 existing commands, which will then override the original
147 147 definitions. This is almost always a bad idea!
148 148
149 149
150 150 ``auth``
151 151 """"""""
152 152 Authentication credentials for HTTP authentication. Each line has
153 153 the following format::
154 154
155 155 <name>.<argument> = <value>
156 156
157 157 where ``<name>`` is used to group arguments into authentication
158 158 entries. Example::
159 159
160 160 foo.prefix = hg.intevation.org/mercurial
161 161 foo.username = foo
162 162 foo.password = bar
163 163 foo.schemes = http https
164 164
165 165 bar.prefix = secure.example.org
166 166 bar.key = path/to/file.key
167 167 bar.cert = path/to/file.cert
168 168 bar.schemes = https
169 169
170 170 Supported arguments:
171 171
172 172 ``prefix``
173 173 Either ``*`` or a URI prefix with or without the scheme part.
174 174 The authentication entry with the longest matching prefix is used
175 175 (where ``*`` matches everything and counts as a match of length
176 176 1). If the prefix doesn't include a scheme, the match is performed
177 177 against the URI with its scheme stripped as well, and the schemes
178 178 argument, q.v., is then subsequently consulted.
179 179 ``username``
180 180 Optional. Username to authenticate with. If not given, and the
181 181 remote site requires basic or digest authentication, the user
182 182 will be prompted for it.
183 183 ``password``
184 184 Optional. Password to authenticate with. If not given, and the
185 185 remote site requires basic or digest authentication, the user
186 186 will be prompted for it.
187 187 ``key``
188 188 Optional. PEM encoded client certificate key file.
189 189 ``cert``
190 190 Optional. PEM encoded client certificate chain file.
191 191 ``schemes``
192 192 Optional. Space separated list of URI schemes to use this
193 193 authentication entry with. Only used if the prefix doesn't include
194 194 a scheme. Supported schemes are http and https. They will match
195 195 static-http and static-https respectively, as well.
196 196 Default: https.
197 197
198 198 If no suitable authentication entry is found, the user is prompted
199 199 for credentials as usual if required by the remote.
200 200
201 201
202 202 ``decode/encode``
203 203 """""""""""""""""
204 204 Filters for transforming files on checkout/checkin. This would
205 205 typically be used for newline processing or other
206 206 localization/canonicalization of files.
207 207
208 208 Filters consist of a filter pattern followed by a filter command.
209 209 Filter patterns are globs by default, rooted at the repository root.
210 210 For example, to match any file ending in ``.txt`` in the root
211 211 directory only, use the pattern ``*.txt``. To match any file ending
212 212 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
213 213 For each file only the first matching filter applies.
214 214
215 215 The filter command can start with a specifier, either ``pipe:`` or
216 216 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
217 217
218 218 A ``pipe:`` command must accept data on stdin and return the transformed
219 219 data on stdout.
220 220
221 221 Pipe example::
222 222
223 223 [encode]
224 224 # uncompress gzip files on checkin to improve delta compression
225 225 # note: not necessarily a good idea, just an example
226 226 *.gz = pipe: gunzip
227 227
228 228 [decode]
229 229 # recompress gzip files when writing them to the working dir (we
230 230 # can safely omit "pipe:", because it's the default)
231 231 *.gz = gzip
232 232
233 233 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
234 234 with the name of a temporary file that contains the data to be
235 235 filtered by the command. The string ``OUTFILE`` is replaced with the name
236 236 of an empty temporary file, where the filtered data must be written by
237 237 the command.
238 238
239 239 .. note:: The tempfile mechanism is recommended for Windows systems,
240 240 where the standard shell I/O redirection operators often have
241 241 strange effects and may corrupt the contents of your files.
242 242
243 243 The most common usage is for LF <-> CRLF translation on Windows. For
244 244 this, use the "smart" converters which check for binary files::
245 245
246 246 [extensions]
247 247 hgext.win32text =
248 248 [encode]
249 249 ** = cleverencode:
250 250 [decode]
251 251 ** = cleverdecode:
252 252
253 253 or if you only want to translate certain files::
254 254
255 255 [extensions]
256 256 hgext.win32text =
257 257 [encode]
258 258 **.txt = dumbencode:
259 259 [decode]
260 260 **.txt = dumbdecode:
261 261
262 262
263 263 ``defaults``
264 264 """"""""""""
265 265
266 266 (defaults are deprecated. Don't use them. Use aliases instead)
267 267
268 268 Use the ``[defaults]`` section to define command defaults, i.e. the
269 269 default options/arguments to pass to the specified commands.
270 270
271 271 The following example makes ``hg log`` run in verbose mode, and ``hg
272 272 status`` show only the modified files, by default::
273 273
274 274 [defaults]
275 275 log = -v
276 276 status = -m
277 277
278 278 The actual commands, instead of their aliases, must be used when
279 279 defining command defaults. The command defaults will also be applied
280 280 to the aliases of the commands defined.
281 281
282 282
283 283 ``diff``
284 284 """"""""
285 285
286 286 Settings used when displaying diffs. They are all Boolean and
287 287 defaults to False.
288 288
289 289 ``git``
290 290 Use git extended diff format.
291 291 ``nodates``
292 292 Don't include dates in diff headers.
293 293 ``showfunc``
294 294 Show which function each change is in.
295 295 ``ignorews``
296 296 Ignore white space when comparing lines.
297 297 ``ignorewsamount``
298 298 Ignore changes in the amount of white space.
299 299 ``ignoreblanklines``
300 300 Ignore changes whose lines are all blank.
301 301
302 302 ``email``
303 303 """""""""
304 304 Settings for extensions that send email messages.
305 305
306 306 ``from``
307 307 Optional. Email address to use in "From" header and SMTP envelope
308 308 of outgoing messages.
309 309 ``to``
310 310 Optional. Comma-separated list of recipients' email addresses.
311 311 ``cc``
312 312 Optional. Comma-separated list of carbon copy recipients'
313 313 email addresses.
314 314 ``bcc``
315 315 Optional. Comma-separated list of blind carbon copy recipients'
316 316 email addresses.
317 317 ``method``
318 318 Optional. Method to use to send email messages. If value is ``smtp``
319 319 (default), use SMTP (see the SMTP_ section for configuration).
320 320 Otherwise, use as name of program to run that acts like sendmail
321 321 (takes ``-f`` option for sender, list of recipients on command line,
322 322 message on stdin). Normally, setting this to ``sendmail`` or
323 323 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
324 324 ``charsets``
325 325 Optional. Comma-separated list of character sets considered
326 326 convenient for recipients. Addresses, headers, and parts not
327 327 containing patches of outgoing messages will be encoded in the
328 328 first character set to which conversion from local encoding
329 329 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
330 330 conversion fails, the text in question is sent as is. Defaults to
331 331 empty (explicit) list.
332 332
333 333 Order of outgoing email character sets:
334 334
335 335 1. ``us-ascii``: always first, regardless of settings
336 336 2. ``email.charsets``: in order given by user
337 337 3. ``ui.fallbackencoding``: if not in email.charsets
338 338 4. ``$HGENCODING``: if not in email.charsets
339 339 5. ``utf-8``: always last, regardless of settings
340 340
341 341 Email example::
342 342
343 343 [email]
344 344 from = Joseph User <joe.user@example.com>
345 345 method = /usr/sbin/sendmail
346 346 # charsets for western Europeans
347 347 # us-ascii, utf-8 omitted, as they are tried first and last
348 348 charsets = iso-8859-1, iso-8859-15, windows-1252
349 349
350 350
351 351 ``extensions``
352 352 """"""""""""""
353 353
354 354 Mercurial has an extension mechanism for adding new features. To
355 355 enable an extension, create an entry for it in this section.
356 356
357 357 If you know that the extension is already in Python's search path,
358 358 you can give the name of the module, followed by ``=``, with nothing
359 359 after the ``=``.
360 360
361 361 Otherwise, give a name that you choose, followed by ``=``, followed by
362 362 the path to the ``.py`` file (including the file name extension) that
363 363 defines the extension.
364 364
365 365 To explicitly disable an extension that is enabled in an hgrc of
366 366 broader scope, prepend its path with ``!``, as in
367 367 ``hgext.foo = !/ext/path`` or ``hgext.foo = !`` when path is not
368 368 supplied.
369 369
370 370 Example for ``~/.hgrc``::
371 371
372 372 [extensions]
373 373 # (the mq extension will get loaded from Mercurial's path)
374 374 hgext.mq =
375 375 # (this extension will get loaded from the file specified)
376 376 myfeature = ~/.hgext/myfeature.py
377 377
378 378
379 379 ``format``
380 380 """"""""""
381 381
382 382 ``usestore``
383 383 Enable or disable the "store" repository format which improves
384 384 compatibility with systems that fold case or otherwise mangle
385 385 filenames. Enabled by default. Disabling this option will allow
386 386 you to store longer filenames in some situations at the expense of
387 387 compatibility and ensures that the on-disk format of newly created
388 388 repositories will be compatible with Mercurial before version 0.9.4.
389 389
390 390 ``usefncache``
391 391 Enable or disable the "fncache" repository format which enhances
392 392 the "store" repository format (which has to be enabled to use
393 393 fncache) to allow longer filenames and avoids using Windows
394 394 reserved names, e.g. "nul". Enabled by default. Disabling this
395 395 option ensures that the on-disk format of newly created
396 396 repositories will be compatible with Mercurial before version 1.1.
397 397
398 398 ``merge-patterns``
399 399 """"""""""""""""""
400 400
401 401 This section specifies merge tools to associate with particular file
402 402 patterns. Tools matched here will take precedence over the default
403 403 merge tool. Patterns are globs by default, rooted at the repository
404 404 root.
405 405
406 406 Example::
407 407
408 408 [merge-patterns]
409 409 **.c = kdiff3
410 410 **.jpg = myimgmerge
411 411
412 412 ``merge-tools``
413 413 """""""""""""""
414 414
415 415 This section configures external merge tools to use for file-level
416 416 merges.
417 417
418 418 Example ``~/.hgrc``::
419 419
420 420 [merge-tools]
421 421 # Override stock tool location
422 422 kdiff3.executable = ~/bin/kdiff3
423 423 # Specify command line
424 424 kdiff3.args = $base $local $other -o $output
425 425 # Give higher priority
426 426 kdiff3.priority = 1
427 427
428 428 # Define new tool
429 429 myHtmlTool.args = -m $local $other $base $output
430 430 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
431 431 myHtmlTool.priority = 1
432 432
433 433 Supported arguments:
434 434
435 435 ``priority``
436 436 The priority in which to evaluate this tool.
437 437 Default: 0.
438 438 ``executable``
439 439 Either just the name of the executable or its pathname. On Windows,
440 440 the path can use environment variables with ${ProgramFiles} syntax.
441 441 Default: the tool name.
442 442 ``args``
443 443 The arguments to pass to the tool executable. You can refer to the
444 444 files being merged as well as the output file through these
445 445 variables: ``$base``, ``$local``, ``$other``, ``$output``.
446 446 Default: ``$local $base $other``
447 447 ``premerge``
448 448 Attempt to run internal non-interactive 3-way merge tool before
449 449 launching external tool.
450 450 Default: True
451 451 ``binary``
452 452 This tool can merge binary files. Defaults to False, unless tool
453 453 was selected by file pattern match.
454 454 ``symlink``
455 455 This tool can merge symlinks. Defaults to False, even if tool was
456 456 selected by file pattern match.
457 457 ``checkconflicts``
458 458 Check whether there are conflicts even though the tool reported
459 459 success.
460 460 Default: False
461 461 ``checkchanged``
462 462 Check whether outputs were written even though the tool reported
463 463 success.
464 464 Default: False
465 465 ``fixeol``
466 466 Attempt to fix up EOL changes caused by the merge tool.
467 467 Default: False
468 468 ``gui``
469 469 This tool requires a graphical interface to run. Default: False
470 470 ``regkey``
471 471 Windows registry key which describes install location of this
472 472 tool. Mercurial will search for this key first under
473 473 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
474 474 Default: None
475 475 ``regname``
476 476 Name of value to read from specified registry key. Defaults to the
477 477 unnamed (default) value.
478 478 ``regappend``
479 479 String to append to the value read from the registry, typically
480 480 the executable name of the tool.
481 481 Default: None
482 482
483 483
484 484 ``hooks``
485 485 """""""""
486 486 Commands or Python functions that get automatically executed by
487 487 various actions such as starting or finishing a commit. Multiple
488 488 hooks can be run for the same action by appending a suffix to the
489 489 action. Overriding a site-wide hook can be done by changing its
490 490 value or setting it to an empty string.
491 491
492 492 Example ``.hg/hgrc``::
493 493
494 494 [hooks]
495 495 # update working directory after adding changesets
496 496 changegroup.update = hg update
497 497 # do not use the site-wide hook
498 498 incoming =
499 499 incoming.email = /my/email/hook
500 500 incoming.autobuild = /my/build/hook
501 501
502 502 Most hooks are run with environment variables set that give useful
503 503 additional information. For each hook below, the environment
504 504 variables it is passed are listed with names of the form ``$HG_foo``.
505 505
506 506 ``changegroup``
507 507 Run after a changegroup has been added via push, pull or unbundle.
508 508 ID of the first new changeset is in ``$HG_NODE``. URL from which
509 509 changes came is in ``$HG_URL``.
510 510 ``commit``
511 511 Run after a changeset has been created in the local repository. ID
512 512 of the newly created changeset is in ``$HG_NODE``. Parent changeset
513 513 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
514 514 ``incoming``
515 515 Run after a changeset has been pulled, pushed, or unbundled into
516 516 the local repository. The ID of the newly arrived changeset is in
517 517 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
518 518 ``outgoing``
519 519 Run after sending changes from local repository to another. ID of
520 520 first changeset sent is in ``$HG_NODE``. Source of operation is in
521 521 ``$HG_SOURCE``; see "preoutgoing" hook for description.
522 522 ``post-<command>``
523 523 Run after successful invocations of the associated command. The
524 524 contents of the command line are passed as ``$HG_ARGS`` and the result
525 525 code in ``$HG_RESULT``. Hook failure is ignored.
526 526 ``pre-<command>``
527 527 Run before executing the associated command. The contents of the
528 528 command line are passed as ``$HG_ARGS``. If the hook returns failure,
529 529 the command doesn't execute and Mercurial returns the failure
530 530 code.
531 531 ``prechangegroup``
532 532 Run before a changegroup is added via push, pull or unbundle. Exit
533 533 status 0 allows the changegroup to proceed. Non-zero status will
534 534 cause the push, pull or unbundle to fail. URL from which changes
535 535 will come is in ``$HG_URL``.
536 536 ``precommit``
537 537 Run before starting a local commit. Exit status 0 allows the
538 538 commit to proceed. Non-zero status will cause the commit to fail.
539 539 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
540 540 ``preoutgoing``
541 541 Run before collecting changes to send from the local repository to
542 542 another. Non-zero status will cause failure. This lets you prevent
543 543 pull over HTTP or SSH. Also prevents against local pull, push
544 544 (outbound) or bundle commands, but not effective, since you can
545 545 just copy files instead then. Source of operation is in
546 546 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
547 547 SSH or HTTP repository. If "push", "pull" or "bundle", operation
548 548 is happening on behalf of repository on same system.
549 549 ``pretag``
550 550 Run before creating a tag. Exit status 0 allows the tag to be
551 551 created. Non-zero status will cause the tag to fail. ID of
552 552 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
553 553 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
554 554 ``pretxnchangegroup``
555 555 Run after a changegroup has been added via push, pull or unbundle,
556 556 but before the transaction has been committed. Changegroup is
557 557 visible to hook program. This lets you validate incoming changes
558 558 before accepting them. Passed the ID of the first new changeset in
559 559 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
560 560 status will cause the transaction to be rolled back and the push,
561 561 pull or unbundle will fail. URL that was source of changes is in
562 562 ``$HG_URL``.
563 563 ``pretxncommit``
564 564 Run after a changeset has been created but the transaction not yet
565 565 committed. Changeset is visible to hook program. This lets you
566 566 validate commit message and changes. Exit status 0 allows the
567 567 commit to proceed. Non-zero status will cause the transaction to
568 568 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
569 569 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
570 570 ``preupdate``
571 571 Run before updating the working directory. Exit status 0 allows
572 572 the update to proceed. Non-zero status will prevent the update.
573 573 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
574 574 of second new parent is in ``$HG_PARENT2``.
575 575 ``tag``
576 576 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
577 577 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
578 578 repository if ``$HG_LOCAL=0``.
579 579 ``update``
580 580 Run after updating the working directory. Changeset ID of first
581 581 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
582 582 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
583 583 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
584 584
585 585 .. note:: It is generally better to use standard hooks rather than the
586 586 generic pre- and post- command hooks as they are guaranteed to be
587 587 called in the appropriate contexts for influencing transactions.
588 588 Also, hooks like "commit" will be called in all contexts that
589 589 generate a commit (e.g. tag) and not just the commit command.
590 590
591 591 .. note:: Environment variables with empty values may not be passed to
592 592 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
593 593 will have an empty value under Unix-like platforms for non-merge
594 594 changesets, while it will not be available at all under Windows.
595 595
596 596 The syntax for Python hooks is as follows::
597 597
598 598 hookname = python:modulename.submodule.callable
599 599 hookname = python:/path/to/python/module.py:callable
600 600
601 601 Python hooks are run within the Mercurial process. Each hook is
602 602 called with at least three keyword arguments: a ui object (keyword
603 603 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
604 604 keyword that tells what kind of hook is used. Arguments listed as
605 605 environment variables above are passed as keyword arguments, with no
606 606 ``HG_`` prefix, and names in lower case.
607 607
608 608 If a Python hook returns a "true" value or raises an exception, this
609 609 is treated as a failure.
610 610
611 611
612 612 ``http_proxy``
613 613 """"""""""""""
614 614 Used to access web-based Mercurial repositories through a HTTP
615 615 proxy.
616 616
617 617 ``host``
618 618 Host name and (optional) port of the proxy server, for example
619 619 "myproxy:8000".
620 620 ``no``
621 621 Optional. Comma-separated list of host names that should bypass
622 622 the proxy.
623 623 ``passwd``
624 624 Optional. Password to authenticate with at the proxy server.
625 625 ``user``
626 626 Optional. User name to authenticate with at the proxy server.
627 627 ``always``
628 628 Optional. Always use the proxy, even for localhost and any entries
629 629 in ``http_proxy.no``. True or False. Default: False.
630 630
631 631 ``smtp``
632 632 """"""""
633 633 Configuration for extensions that need to send email messages.
634 634
635 635 ``host``
636 636 Host name of mail server, e.g. "mail.example.com".
637 637 ``port``
638 638 Optional. Port to connect to on mail server. Default: 25.
639 639 ``tls``
640 640 Optional. Whether to connect to mail server using TLS. True or
641 641 False. Default: False.
642 642 ``username``
643 643 Optional. User name to authenticate to SMTP server with. If
644 644 username is specified, password must also be specified.
645 645 Default: none.
646 646 ``password``
647 647 Optional. Password to authenticate to SMTP server with. If
648 648 username is specified, password must also be specified.
649 649 Default: none.
650 650 ``local_hostname``
651 651 Optional. It's the hostname that the sender can use to identify
652 652 itself to the MTA.
653 653
654 654
655 655 ``patch``
656 656 """""""""
657 657 Settings used when applying patches, for instance through the 'import'
658 658 command or with Mercurial Queues extension.
659 659
660 660 ``eol``
661 661 When set to 'strict' patch content and patched files end of lines
662 662 are preserved. When set to ``lf`` or ``crlf``, both files end of
663 663 lines are ignored when patching and the result line endings are
664 664 normalized to either LF (Unix) or CRLF (Windows). When set to
665 665 ``auto``, end of lines are again ignored while patching but line
666 666 endings in patched files are normalized to their original setting
667 667 on a per-file basis. If target file does not exist or has no end
668 668 of line, patch line endings are preserved.
669 669 Default: strict.
670 670
671 671
672 672 ``paths``
673 673 """""""""
674 674 Assigns symbolic names to repositories. The left side is the
675 675 symbolic name, and the right gives the directory or URL that is the
676 676 location of the repository. Default paths can be declared by setting
677 677 the following entries.
678 678
679 679 ``default``
680 680 Directory or URL to use when pulling if no source is specified.
681 681 Default is set to repository from which the current repository was
682 682 cloned.
683 683 ``default-push``
684 684 Optional. Directory or URL to use when pushing if no destination
685 685 is specified.
686 686
687 687
688 688 ``profiling``
689 689 """""""""""""
690 690 Specifies profiling format and file output. In this section
691 691 description, 'profiling data' stands for the raw data collected
692 692 during profiling, while 'profiling report' stands for a statistical
693 693 text report generated from the profiling data. The profiling is done
694 694 using lsprof.
695 695
696 696 ``format``
697 697 Profiling format.
698 698 Default: text.
699 699
700 700 ``text``
701 701 Generate a profiling report. When saving to a file, it should be
702 702 noted that only the report is saved, and the profiling data is
703 703 not kept.
704 704 ``kcachegrind``
705 705 Format profiling data for kcachegrind use: when saving to a
706 706 file, the generated file can directly be loaded into
707 707 kcachegrind.
708 708 ``output``
709 709 File path where profiling data or report should be saved. If the
710 710 file exists, it is replaced. Default: None, data is printed on
711 711 stderr
712 712
713 713 ``server``
714 714 """"""""""
715 715 Controls generic server settings.
716 716
717 717 ``uncompressed``
718 718 Whether to allow clients to clone a repository using the
719 719 uncompressed streaming protocol. This transfers about 40% more
720 720 data than a regular clone, but uses less memory and CPU on both
721 721 server and client. Over a LAN (100 Mbps or better) or a very fast
722 722 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
723 723 regular clone. Over most WAN connections (anything slower than
724 724 about 6 Mbps), uncompressed streaming is slower, because of the
725 725 extra data transfer overhead. This mode will also temporarily hold
726 726 the write lock while determining what data to transfer.
727 727 Default is True.
728 728
729 729 ``validate``
730 730 Whether to validate the completeness of pushed changesets by
731 731 checking that all new file revisions specified in manifests are
732 732 present. Default is False.
733 733
734 734 ``trusted``
735 735 """""""""""
736 736 For security reasons, Mercurial will not use the settings in the
737 737 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
738 738 user or to a trusted group. The main exception is the web interface,
739 739 which automatically uses some safe settings, since it's common to
740 740 serve repositories from different users.
741 741
742 742 This section specifies what users and groups are trusted. The
743 743 current user is always trusted. To trust everybody, list a user or a
744 744 group with name ``*``.
745 745
746 746 ``users``
747 747 Comma-separated list of trusted users.
748 748 ``groups``
749 749 Comma-separated list of trusted groups.
750 750
751 751
752 752 ``ui``
753 753 """"""
754 754
755 755 User interface controls.
756 756
757 757 ``archivemeta``
758 758 Whether to include the .hg_archival.txt file containing meta data
759 759 (hashes for the repository base and for tip) in archives created
760 760 by the hg archive command or downloaded via hgweb.
761 761 Default is True.
762 762 ``askusername``
763 763 Whether to prompt for a username when committing. If True, and
764 764 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
765 765 be prompted to enter a username. If no username is entered, the
766 766 default ``USER@HOST`` is used instead.
767 767 Default is False.
768 768 ``debug``
769 769 Print debugging information. True or False. Default is False.
770 770 ``editor``
771 771 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
772 772 ``fallbackencoding``
773 773 Encoding to try if it's not possible to decode the changelog using
774 774 UTF-8. Default is ISO-8859-1.
775 775 ``ignore``
776 776 A file to read per-user ignore patterns from. This file should be
777 777 in the same format as a repository-wide .hgignore file. This
778 778 option supports hook syntax, so if you want to specify multiple
779 779 ignore files, you can do so by setting something like
780 780 ``ignore.other = ~/.hgignore2``. For details of the ignore file
781 781 format, see the |hgignore(5)|_ man page.
782 782 ``interactive``
783 783 Allow to prompt the user. True or False. Default is True.
784 784 ``logtemplate``
785 785 Template string for commands that print changesets.
786 786 ``merge``
787 787 The conflict resolution program to use during a manual merge.
788 788 There are some internal tools available:
789 789
790 790 ``internal:local``
791 791 keep the local version
792 792 ``internal:other``
793 793 use the other version
794 794 ``internal:merge``
795 795 use the internal non-interactive merge tool
796 796 ``internal:fail``
797 797 fail to merge
798 798
799 799 For more information on configuring merge tools see the
800 800 merge-tools_ section.
801 801
802 802 ``patch``
803 803 command to use to apply patches. Look for ``gpatch`` or ``patch`` in
804 804 PATH if unset.
805 805 ``quiet``
806 806 Reduce the amount of output printed. True or False. Default is False.
807 807 ``remotecmd``
808 808 remote command to use for clone/push/pull operations. Default is ``hg``.
809 809 ``report_untrusted``
810 810 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
811 811 trusted user or group. True or False. Default is True.
812 812 ``slash``
813 813 Display paths using a slash (``/``) as the path separator. This
814 814 only makes a difference on systems where the default path
815 815 separator is not the slash character (e.g. Windows uses the
816 816 backslash character (``\``)).
817 817 Default is False.
818 818 ``ssh``
819 819 command to use for SSH connections. Default is ``ssh``.
820 820 ``strict``
821 821 Require exact command names, instead of allowing unambiguous
822 822 abbreviations. True or False. Default is False.
823 823 ``style``
824 824 Name of style to use for command output.
825 825 ``timeout``
826 826 The timeout used when a lock is held (in seconds), a negative value
827 827 means no timeout. Default is 600.
828 828 ``traceback``
829 829 Mercurial always prints a traceback when an unknown exception
830 830 occurs. Setting this to True will make Mercurial print a traceback
831 831 on all exceptions, even those recognized by Mercurial (such as
832 832 IOError or MemoryError). Default is False.
833 833 ``username``
834 834 The committer of a changeset created when running "commit".
835 835 Typically a person's name and email address, e.g. ``Fred Widget
836 836 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
837 837 the username in hgrc is empty, it has to be specified manually or
838 838 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
839 839 ``username =`` in the system hgrc).
840 840 ``verbose``
841 841 Increase the amount of output printed. True or False. Default is False.
842 842
843 843
844 844 ``web``
845 845 """""""
846 846 Web interface configuration.
847 847
848 848 ``accesslog``
849 849 Where to output the access log. Default is stdout.
850 850 ``address``
851 851 Interface address to bind to. Default is all.
852 852 ``allow_archive``
853 853 List of archive format (bz2, gz, zip) allowed for downloading.
854 854 Default is empty.
855 855 ``allowbz2``
856 856 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
857 857 revisions.
858 858 Default is False.
859 859 ``allowgz``
860 860 (DEPRECATED) Whether to allow .tar.gz downloading of repository
861 861 revisions.
862 862 Default is False.
863 863 ``allowpull``
864 864 Whether to allow pulling from the repository. Default is True.
865 865 ``allow_push``
866 866 Whether to allow pushing to the repository. If empty or not set,
867 867 push is not allowed. If the special value ``*``, any remote user can
868 868 push, including unauthenticated users. Otherwise, the remote user
869 869 must have been authenticated, and the authenticated user name must
870 870 be present in this list (separated by whitespace or ``,``). The
871 871 contents of the allow_push list are examined after the deny_push
872 872 list.
873 873 ``allow_read``
874 874 If the user has not already been denied repository access due to
875 875 the contents of deny_read, this list determines whether to grant
876 876 repository access to the user. If this list is not empty, and the
877 877 user is unauthenticated or not present in the list (separated by
878 878 whitespace or ``,``), then access is denied for the user. If the
879 879 list is empty or not set, then access is permitted to all users by
880 880 default. Setting allow_read to the special value ``*`` is equivalent
881 881 to it not being set (i.e. access is permitted to all users). The
882 882 contents of the allow_read list are examined after the deny_read
883 883 list.
884 884 ``allowzip``
885 885 (DEPRECATED) Whether to allow .zip downloading of repository
886 886 revisions. Default is False. This feature creates temporary files.
887 887 ``baseurl``
888 888 Base URL to use when publishing URLs in other locations, so
889 889 third-party tools like email notification hooks can construct
890 890 URLs. Example: ``http://hgserver/repos/``.
891 891 ``cacerts``
892 892 Path to file containing a list of PEM encoded certificate authorities
893 893 that may be used to verify an SSL server's identity. The form must be
894 894 as follows::
895 895
896 896 -----BEGIN CERTIFICATE-----
897 897 ... (certificate in base64 PEM encoding) ...
898 898 -----END CERTIFICATE-----
899 899 -----BEGIN CERTIFICATE-----
900 900 ... (certificate in base64 PEM encoding) ...
901 901 -----END CERTIFICATE-----
902 902
903 903 This feature is only supported when using Python 2.6. If you wish to
904 904 use it with earlier versions of Python, install the backported
905 905 version of the ssl library that is available from
906 906 ``http://pypi.python.org``.
907 907
908 908 You can use OpenSSL's CA certificate file if your platform has one.
909 909 On most Linux systems this will be ``/etc/ssl/certs/ca-certificates.crt``.
910 910 Otherwise you will have to generate this file manually.
911 911 ``contact``
912 912 Name or email address of the person in charge of the repository.
913 913 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
914 914 ``deny_push``
915 915 Whether to deny pushing to the repository. If empty or not set,
916 916 push is not denied. If the special value ``*``, all remote users are
917 917 denied push. Otherwise, unauthenticated users are all denied, and
918 918 any authenticated user name present in this list (separated by
919 919 whitespace or ``,``) is also denied. The contents of the deny_push
920 920 list are examined before the allow_push list.
921 921 ``deny_read``
922 922 Whether to deny reading/viewing of the repository. If this list is
923 923 not empty, unauthenticated users are all denied, and any
924 924 authenticated user name present in this list (separated by
925 925 whitespace or ``,``) is also denied access to the repository. If set
926 926 to the special value ``*``, all remote users are denied access
927 927 (rarely needed ;). If deny_read is empty or not set, the
928 928 determination of repository access depends on the presence and
929 929 content of the allow_read list (see description). If both
930 930 deny_read and allow_read are empty or not set, then access is
931 931 permitted to all users by default. If the repository is being
932 932 served via hgwebdir, denied users will not be able to see it in
933 933 the list of repositories. The contents of the deny_read list have
934 934 priority over (are examined before) the contents of the allow_read
935 935 list.
936 936 ``descend``
937 937 hgwebdir indexes will not descend into subdirectories. Only repositories
938 938 directly in the current path will be shown (other repositories are still
939 939 available from the index corresponding to their containing path).
940 940 ``description``
941 941 Textual description of the repository's purpose or contents.
942 942 Default is "unknown".
943 943 ``encoding``
944 944 Character encoding name.
945 945 Example: "UTF-8"
946 946 ``errorlog``
947 947 Where to output the error log. Default is stderr.
948 948 ``hidden``
949 949 Whether to hide the repository in the hgwebdir index.
950 950 Default is False.
951 951 ``ipv6``
952 952 Whether to use IPv6. Default is False.
953 953 ``name``
954 954 Repository name to use in the web interface. Default is current
955 955 working directory.
956 956 ``maxchanges``
957 957 Maximum number of changes to list on the changelog. Default is 10.
958 958 ``maxfiles``
959 959 Maximum number of files to list per changeset. Default is 10.
960 960 ``port``
961 961 Port to listen on. Default is 8000.
962 962 ``prefix``
963 963 Prefix path to serve from. Default is '' (server root).
964 964 ``push_ssl``
965 965 Whether to require that inbound pushes be transported over SSL to
966 966 prevent password sniffing. Default is True.
967 967 ``staticurl``
968 968 Base URL to use for static files. If unset, static files (e.g. the
969 969 hgicon.png favicon) will be served by the CGI script itself. Use
970 970 this setting to serve them directly with the HTTP server.
971 971 Example: ``http://hgserver/static/``.
972 972 ``stripes``
973 973 How many lines a "zebra stripe" should span in multiline output.
974 974 Default is 1; set to 0 to disable.
975 975 ``style``
976 976 Which template map style to use.
977 977 ``templates``
978 978 Where to find the HTML templates. Default is install path.
979 979
980 980
981 981 Author
982 982 ------
983 983 Bryan O'Sullivan <bos@serpentine.com>.
984 984
985 985 Mercurial was written by Matt Mackall <mpm@selenic.com>.
986 986
987 987 See Also
988 988 --------
989 989 |hg(1)|_, |hgignore(5)|_
990 990
991 991 Copying
992 992 -------
993 993 This manual page is copyright 2005 Bryan O'Sullivan.
994 994 Mercurial is copyright 2005-2010 Matt Mackall.
995 995 Free use of this software is granted under the terms of the GNU General
996 996 Public License version 2 or any later version.
997 997
998 998 .. include:: common.txt
General Comments 0
You need to be logged in to leave comments. Login now