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