##// END OF EJS Templates
hgrc.5: wrap lines at 70 chars (whitespace cleanup)
Martin Geisler -
r8730:01f0ddb9 default
parent child Browse files
Show More
@@ -17,27 +17,25 b' FILES'
17
17
18 Mercurial reads configuration data from several files, if they exist.
18 Mercurial reads configuration data from several files, if they exist.
19 The names of these files depend on the system on which Mercurial is
19 The names of these files depend on the system on which Mercurial is
20 installed. *.rc files from a single directory are read in
20 installed. *.rc files from a single directory are read in alphabetical
21 alphabetical order, later ones overriding earlier ones. Where
21 order, later ones overriding earlier ones. Where multiple paths are
22 multiple paths are given below, settings from later paths override
22 given below, settings from later paths override earlier ones.
23 earlier ones.
24
23
25 (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc::
24 (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc::
26 (Unix) <install-root>/etc/mercurial/hgrc::
25 (Unix) <install-root>/etc/mercurial/hgrc::
27 Per-installation configuration files, searched for in the
26 Per-installation configuration files, searched for in the
28 directory where Mercurial is installed. <install-root> is the
27 directory where Mercurial is installed. <install-root> is the
29 parent directory of the hg executable (or symlink) being run.
28 parent directory of the hg executable (or symlink) being run. For
30 For example, if installed in /shared/tools/bin/hg, Mercurial will
29 example, if installed in /shared/tools/bin/hg, Mercurial will look
31 look in /shared/tools/etc/mercurial/hgrc. Options in these files
30 in /shared/tools/etc/mercurial/hgrc. Options in these files apply
32 apply to all Mercurial commands executed by any user in any
31 to all Mercurial commands executed by any user in any directory.
33 directory.
34
32
35 (Unix) /etc/mercurial/hgrc.d/*.rc::
33 (Unix) /etc/mercurial/hgrc.d/*.rc::
36 (Unix) /etc/mercurial/hgrc::
34 (Unix) /etc/mercurial/hgrc::
37 Per-system configuration files, for the system on which Mercurial
35 Per-system configuration files, for the system on which Mercurial
38 is running. Options in these files apply to all Mercurial
36 is running. Options in these files apply to all Mercurial commands
39 commands executed by any user in any directory. Options in these
37 executed by any user in any directory. Options in these files
40 files override per-installation options.
38 override per-installation options.
41
39
42 (Windows) <install-dir>\Mercurial.ini::
40 (Windows) <install-dir>\Mercurial.ini::
43 or else::
41 or else::
@@ -46,30 +44,30 b' earlier ones.'
46 (Windows) C:\Mercurial\Mercurial.ini::
44 (Windows) C:\Mercurial\Mercurial.ini::
47 Per-installation/system configuration files, for the system on
45 Per-installation/system configuration files, for the system on
48 which Mercurial is running. Options in these files apply to all
46 which Mercurial is running. Options in these files apply to all
49 Mercurial commands executed by any user in any directory.
47 Mercurial commands executed by any user in any directory. Registry
50 Registry keys contain PATH-like strings, every part of which must
48 keys contain PATH-like strings, every part of which must reference
51 reference a Mercurial.ini file or be a directory where *.rc files
49 a Mercurial.ini file or be a directory where *.rc files will be
52 will be read.
50 read.
53
51
54 (Unix) $HOME/.hgrc::
52 (Unix) $HOME/.hgrc::
55 (Windows) %HOME%\Mercurial.ini::
53 (Windows) %HOME%\Mercurial.ini::
56 (Windows) %HOME%\.hgrc::
54 (Windows) %HOME%\.hgrc::
57 (Windows) %USERPROFILE%\Mercurial.ini::
55 (Windows) %USERPROFILE%\Mercurial.ini::
58 (Windows) %USERPROFILE%\.hgrc::
56 (Windows) %USERPROFILE%\.hgrc::
59 Per-user configuration file(s), for the user running Mercurial.
57 Per-user configuration file(s), for the user running Mercurial. On
60 On Windows 9x, %HOME% is replaced by %APPDATA%.
58 Windows 9x, %HOME% is replaced by %APPDATA%.
61 Options in these files apply to all Mercurial commands executed
59 Options in these files apply to all Mercurial commands executed by
62 by this user in any directory. Options in thes files override
60 this user in any directory. Options in thes files override
63 per-installation and per-system options.
61 per-installation and per-system options.
64
62
65 (Unix, Windows) <repo>/.hg/hgrc::
63 (Unix, Windows) <repo>/.hg/hgrc::
66 Per-repository configuration options that only apply in a
64 Per-repository configuration options that only apply in a
67 particular repository. This file is not version-controlled, and
65 particular repository. This file is not version-controlled, and
68 will not get transferred during a "clone" operation. Options in
66 will not get transferred during a "clone" operation. Options in
69 this file override options in all other configuration files.
67 this file override options in all other configuration files. On
70 On Unix, most of this file will be ignored if it doesn't belong
68 Unix, most of this file will be ignored if it doesn't belong to a
71 to a trusted user or to a trusted group. See the documentation
69 trusted user or to a trusted group. See the documentation for the
72 for the trusted section below for more details.
70 trusted section below for more details.
73
71
74 SYNTAX
72 SYNTAX
75 ------
73 ------
@@ -97,8 +95,8 b' SECTIONS'
97 --------
95 --------
98
96
99 This section describes the different sections that may appear in a
97 This section describes the different sections that may appear in a
100 Mercurial "hgrc" file, the purpose of each section, its possible
98 Mercurial "hgrc" file, the purpose of each section, its possible keys,
101 keys, and their possible values.
99 and their possible values.
102
100
103 [[alias]]
101 [[alias]]
104 alias::
102 alias::
@@ -120,18 +118,17 b' changesets. You can define subsequent al'
120 stable5 = latest -b stable
118 stable5 = latest -b stable
121 +
119 +
122 *Note*: It is possible to create aliases with the same names as
120 *Note*: It is possible to create aliases with the same names as
123 existing commands, which will then override the original
121 existing commands, which will then override the original definitions.
124 definitions. This is almost always a bad idea!
122 This is almost always a bad idea!
125
123
126 [[auth]]
124 [[auth]]
127 auth::
125 auth::
128 Authentication credentials for HTTP authentication.
126 Authentication credentials for HTTP authentication. Each line has
129 Each line has the following format:
127 the following format:
130
128
131 <name>.<argument> = <value>
129 <name>.<argument> = <value>
132
130
133 where <name> is used to group arguments into authentication
131 where <name> is used to group arguments into authentication entries.
134 entries.
135 Example:
132 Example:
136
133
137 foo.prefix = hg.intevation.org/mercurial
134 foo.prefix = hg.intevation.org/mercurial
@@ -145,23 +142,23 b' auth::'
145 Either '*' or a URI prefix with or without the scheme part. The
142 Either '*' or a URI prefix with or without the scheme part. The
146 authentication entry with the longest matching prefix is used
143 authentication entry with the longest matching prefix is used
147 (where '*' matches everything and counts as a match of length 1).
144 (where '*' matches everything and counts as a match of length 1).
148 If the prefix doesn't include a scheme, the match is performed against
145 If the prefix doesn't include a scheme, the match is performed
149 the URI with its scheme stripped as well, and the schemes argument,
146 against the URI with its scheme stripped as well, and the schemes
150 q.v., is then subsequently consulted.
147 argument, q.v., is then subsequently consulted.
151 username;;
148 username;;
152 Username to authenticate with.
149 Username to authenticate with.
153 password;;
150 password;;
154 Optional. Password to authenticate with. If not given the user will be
151 Optional. Password to authenticate with. If not given the user
155 prompted for it.
152 will be prompted for it.
156 schemes;;
153 schemes;;
157 Optional. Space separated list of URI schemes to use this authentication
154 Optional. Space separated list of URI schemes to use this
158 entry with. Only used if the prefix doesn't include a scheme. Supported
155 authentication entry with. Only used if the prefix doesn't include
159 schemes are http and https. They will match static-http and static-https
156 a scheme. Supported schemes are http and https. They will match
160 respectively, as well.
157 static-http and static-https respectively, as well.
161 Default: https.
158 Default: https.
162
159
163 If no suitable authentication entry is found, the user is
160 If no suitable authentication entry is found, the user is prompted
164 prompted for credentials as usual if required by the remote.
161 for credentials as usual if required by the remote.
165
162
166 [[decode]]
163 [[decode]]
167 decode/encode::
164 decode/encode::
@@ -170,14 +167,13 b' decode/encode::'
170 localization/canonicalization of files.
167 localization/canonicalization of files.
171
168
172 Filters consist of a filter pattern followed by a filter command.
169 Filters consist of a filter pattern followed by a filter command.
173 Filter patterns are globs by default, rooted at the repository
170 Filter patterns are globs by default, rooted at the repository root.
174 root. For example, to match any file ending in ".txt" in the root
171 For example, to match any file ending in ".txt" in the root
175 directory only, use the pattern "*.txt". To match any file ending
172 directory only, use the pattern "*.txt". To match any file ending in
176 in ".c" anywhere in the repository, use the pattern "**.c".
173 ".c" anywhere in the repository, use the pattern "**.c".
177
174
178 The filter command can start with a specifier, either "pipe:" or
175 The filter command can start with a specifier, either "pipe:" or
179 "tempfile:". If no specifier is given, "pipe:" is used by
176 "tempfile:". If no specifier is given, "pipe:" is used by default.
180 default.
181
177
182 A "pipe:" command must accept data on stdin and return the
178 A "pipe:" command must accept data on stdin and return the
183 transformed data on stdout.
179 transformed data on stdout.
@@ -194,19 +190,18 b' decode/encode::'
194 # can safely omit "pipe:", because it's the default)
190 # can safely omit "pipe:", because it's the default)
195 *.gz = gzip
191 *.gz = gzip
196
192
197 A "tempfile:" command is a template. The string INFILE is
193 A "tempfile:" command is a template. The string INFILE is replaced
198 replaced with the name of a temporary file that contains the data
194 with the name of a temporary file that contains the data to be
199 to be filtered by the command. The string OUTFILE is replaced
195 filtered by the command. The string OUTFILE is replaced with the
200 with the name of an empty temporary file, where the filtered data
196 name of an empty temporary file, where the filtered data must be
201 must be written by the command.
197 written by the command.
202
198
203 NOTE: the tempfile mechanism is recommended for Windows systems,
199 NOTE: the tempfile mechanism is recommended for Windows systems,
204 where the standard shell I/O redirection operators often have
200 where the standard shell I/O redirection operators often have
205 strange effects and may corrupt the contents of your files.
201 strange effects and may corrupt the contents of your files.
206
202
207 The most common usage is for LF <-> CRLF translation on Windows.
203 The most common usage is for LF <-> CRLF translation on Windows. For
208 For this, use the "smart" convertors which check for binary
204 this, use the "smart" convertors which check for binary files:
209 files:
210
205
211 [extensions]
206 [extensions]
212 hgext.win32text =
207 hgext.win32text =
@@ -229,16 +224,16 b' defaults::'
229 Use the [defaults] section to define command defaults, i.e. the
224 Use the [defaults] section to define command defaults, i.e. the
230 default options/arguments to pass to the specified commands.
225 default options/arguments to pass to the specified commands.
231
226
232 The following example makes 'hg log' run in verbose mode, and
227 The following example makes 'hg log' run in verbose mode, and 'hg
233 'hg status' show only the modified files, by default.
228 status' show only the modified files, by default.
234
229
235 [defaults]
230 [defaults]
236 log = -v
231 log = -v
237 status = -m
232 status = -m
238
233
239 The actual commands, instead of their aliases, must be used when
234 The actual commands, instead of their aliases, must be used when
240 defining command defaults. The command defaults will also be
235 defining command defaults. The command defaults will also be applied
241 applied to the aliases of the commands defined.
236 to the aliases of the commands defined.
242
237
243 [[diff]]
238 [[diff]]
244 diff::
239 diff::
@@ -269,24 +264,22 b' email::'
269 Optional. Comma-separated list of carbon copy recipients'
264 Optional. Comma-separated list of carbon copy recipients'
270 email addresses.
265 email addresses.
271 bcc;;
266 bcc;;
272 Optional. Comma-separated list of blind carbon copy
267 Optional. Comma-separated list of blind carbon copy recipients'
273 recipients' email addresses. Cannot be set interactively.
268 email addresses. Cannot be set interactively.
274 method;;
269 method;;
275 Optional. Method to use to send email messages. If value is
270 Optional. Method to use to send email messages. If value is "smtp"
276 "smtp" (default), use SMTP (see section "[smtp]" for
271 (default), use SMTP (see section "[smtp]" for configuration).
277 configuration). Otherwise, use as name of program to run that
272 Otherwise, use as name of program to run that acts like sendmail
278 acts like sendmail (takes "-f" option for sender, list of
273 (takes "-f" option for sender, list of recipients on command line,
279 recipients on command line, message on stdin). Normally, setting
274 message on stdin). Normally, setting this to "sendmail" or
280 this to "sendmail" or "/usr/sbin/sendmail" is enough to use
275 "/usr/sbin/sendmail" is enough to use sendmail to send messages.
281 sendmail to send messages.
282 charsets;;
276 charsets;;
283 Optional. Comma-separated list of charsets considered
277 Optional. Comma-separated list of charsets considered convenient
284 convenient for recipients. Addresses, headers, and parts not
278 for recipients. Addresses, headers, and parts not containing
285 containing patches of outgoing messages will be encoded in
279 patches of outgoing messages will be encoded in the first charset
286 the first charset to which conversion from local encoding
280 to which conversion from local encoding ($HGENCODING,
287 ($HGENCODING, ui.fallbackencoding) succeeds. If correct
281 ui.fallbackencoding) succeeds. If correct conversion fails, the
288 conversion fails, the text in question is sent as is.
282 text in question is sent as is. Defaults to empty (explicit) list.
289 Defaults to empty (explicit) list.
290
283
291 Order of outgoing email charsets:
284 Order of outgoing email charsets:
292
285
@@ -310,13 +303,13 b' extensions::'
310 Mercurial has an extension mechanism for adding new features. To
303 Mercurial has an extension mechanism for adding new features. To
311 enable an extension, create an entry for it in this section.
304 enable an extension, create an entry for it in this section.
312
305
313 If you know that the extension is already in Python's search
306 If you know that the extension is already in Python's search path,
314 path, you can give the name of the module, followed by "=", with
307 you can give the name of the module, followed by "=", with nothing
315 nothing after the "=".
308 after the "=".
316
309
317 Otherwise, give a name that you choose, followed by "=", followed
310 Otherwise, give a name that you choose, followed by "=", followed by
318 by the path to the ".py" file (including the file name extension)
311 the path to the ".py" file (including the file name extension) that
319 that defines the extension.
312 defines the extension.
320
313
321 To explicitly disable an extension that is enabled in an hgrc of
314 To explicitly disable an extension that is enabled in an hgrc of
322 broader scope, prepend its path with '!', as in
315 broader scope, prepend its path with '!', as in
@@ -345,16 +338,17 b' format::'
345 usefncache;;
338 usefncache;;
346 Enable or disable the "fncache" repository format which enhances
339 Enable or disable the "fncache" repository format which enhances
347 the "store" repository format (which has to be enabled to use
340 the "store" repository format (which has to be enabled to use
348 fncache) to allow longer filenames and avoids using Windows reserved
341 fncache) to allow longer filenames and avoids using Windows
349 names, e.g. "nul". Enabled by default. Disabling this option ensures
342 reserved names, e.g. "nul". Enabled by default. Disabling this
350 that the on-disk format of newly created repositories will be
343 option ensures that the on-disk format of newly created
351 compatible with Mercurial before version 1.1.
344 repositories will be compatible with Mercurial before version 1.1.
352
345
353 [[merge-patterns]]
346 [[merge-patterns]]
354 merge-patterns::
347 merge-patterns::
355 This section specifies merge tools to associate with particular file
348 This section specifies merge tools to associate with particular file
356 patterns. Tools matched here will take precedence over the default
349 patterns. Tools matched here will take precedence over the default
357 merge tool. Patterns are globs by default, rooted at the repository root.
350 merge tool. Patterns are globs by default, rooted at the repository
351 root.
358
352
359 Example:
353 Example:
360
354
@@ -391,9 +385,9 b' merge-tools::'
391 Either just the name of the executable or its pathname.
385 Either just the name of the executable or its pathname.
392 Default: the tool name.
386 Default: the tool name.
393 args;;
387 args;;
394 The arguments to pass to the tool executable. You can refer to the files
388 The arguments to pass to the tool executable. You can refer to the
395 being merged as well as the output file through these variables: $base,
389 files being merged as well as the output file through these
396 $local, $other, $output.
390 variables: $base, $local, $other, $output.
397 Default: $local $base $other
391 Default: $local $base $other
398 premerge;;
392 premerge;;
399 Attempt to run internal non-interactive 3-way merge tool before
393 Attempt to run internal non-interactive 3-way merge tool before
@@ -419,15 +413,17 b' merge-tools::'
419 gui;;
413 gui;;
420 This tool requires a graphical interface to run. Default: False
414 This tool requires a graphical interface to run. Default: False
421 regkey;;
415 regkey;;
422 Windows registry key which describes install location of this tool.
416 Windows registry key which describes install location of this
423 Mercurial will search for this key first under HKEY_CURRENT_USER and
417 tool. Mercurial will search for this key first under
424 then under HKEY_LOCAL_MACHINE. Default: None
418 HKEY_CURRENT_USER and then under HKEY_LOCAL_MACHINE.
419 Default: None
425 regname;;
420 regname;;
426 Name of value to read from specified registry key. Defaults to the
421 Name of value to read from specified registry key. Defaults to the
427 unnamed (default) value.
422 unnamed (default) value.
428 regappend;;
423 regappend;;
429 String to append to the value read from the registry, typically the
424 String to append to the value read from the registry, typically
430 executable name of the tool. Default: None
425 the executable name of the tool.
426 Default: None
431
427
432 [[hooks]]
428 [[hooks]]
433 hooks::
429 hooks::
@@ -450,13 +446,13 b' hooks::'
450 variables it is passed are listed with names of the form "$HG_foo".
446 variables it is passed are listed with names of the form "$HG_foo".
451
447
452 changegroup;;
448 changegroup;;
453 Run after a changegroup has been added via push, pull or
449 Run after a changegroup has been added via push, pull or unbundle.
454 unbundle. ID of the first new changeset is in $HG_NODE. URL from
450 ID of the first new changeset is in $HG_NODE. URL from which
455 which changes came is in $HG_URL.
451 changes came is in $HG_URL.
456 commit;;
452 commit;;
457 Run after a changeset has been created in the local repository.
453 Run after a changeset has been created in the local repository. ID
458 ID of the newly created changeset is in $HG_NODE. Parent
454 of the newly created changeset is in $HG_NODE. Parent changeset
459 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
455 IDs are in $HG_PARENT1 and $HG_PARENT2.
460 incoming;;
456 incoming;;
461 Run after a changeset has been pulled, pushed, or unbundled into
457 Run after a changeset has been pulled, pushed, or unbundled into
462 the local repository. The ID of the newly arrived changeset is in
458 the local repository. The ID of the newly arrived changeset is in
@@ -472,39 +468,40 b' hooks::'
472 pre-<command>;;
468 pre-<command>;;
473 Run before executing the associated command. The contents of the
469 Run before executing the associated command. The contents of the
474 command line are passed as $HG_ARGS. If the hook returns failure,
470 command line are passed as $HG_ARGS. If the hook returns failure,
475 the command doesn't execute and Mercurial returns the failure code.
471 the command doesn't execute and Mercurial returns the failure
472 code.
476 prechangegroup;;
473 prechangegroup;;
477 Run before a changegroup is added via push, pull or unbundle.
474 Run before a changegroup is added via push, pull or unbundle. Exit
478 Exit status 0 allows the changegroup to proceed. Non-zero status
475 status 0 allows the changegroup to proceed. Non-zero status will
479 will cause the push, pull or unbundle to fail. URL from which
476 cause the push, pull or unbundle to fail. URL from which changes
480 changes will come is in $HG_URL.
477 will come is in $HG_URL.
481 precommit;;
478 precommit;;
482 Run before starting a local commit. Exit status 0 allows the
479 Run before starting a local commit. Exit status 0 allows the
483 commit to proceed. Non-zero status will cause the commit to fail.
480 commit to proceed. Non-zero status will cause the commit to fail.
484 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
481 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
485 preoutgoing;;
482 preoutgoing;;
486 Run before collecting changes to send from the local repository to
483 Run before collecting changes to send from the local repository to
487 another. Non-zero status will cause failure. This lets you
484 another. Non-zero status will cause failure. This lets you prevent
488 prevent pull over http or ssh. Also prevents against local pull,
485 pull over http or ssh. Also prevents against local pull, push
489 push (outbound) or bundle commands, but not effective, since you
486 (outbound) or bundle commands, but not effective, since you can
490 can just copy files instead then. Source of operation is in
487 just copy files instead then. Source of operation is in
491 $HG_SOURCE. If "serve", operation is happening on behalf of
488 $HG_SOURCE. If "serve", operation is happening on behalf of remote
492 remote ssh or http repository. If "push", "pull" or "bundle",
489 ssh or http repository. If "push", "pull" or "bundle", operation
493 operation is happening on behalf of repository on same system.
490 is happening on behalf of repository on same system.
494 pretag;;
491 pretag;;
495 Run before creating a tag. Exit status 0 allows the tag to be
492 Run before creating a tag. Exit status 0 allows the tag to be
496 created. Non-zero status will cause the tag to fail. ID of
493 created. Non-zero status will cause the tag to fail. ID of
497 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
494 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag is
498 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
495 local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
499 pretxnchangegroup;;
496 pretxnchangegroup;;
500 Run after a changegroup has been added via push, pull or unbundle,
497 Run after a changegroup has been added via push, pull or unbundle,
501 but before the transaction has been committed. Changegroup is
498 but before the transaction has been committed. Changegroup is
502 visible to hook program. This lets you validate incoming changes
499 visible to hook program. This lets you validate incoming changes
503 before accepting them. Passed the ID of the first new changeset
500 before accepting them. Passed the ID of the first new changeset in
504 in $HG_NODE. Exit status 0 allows the transaction to commit.
501 $HG_NODE. Exit status 0 allows the transaction to commit. Non-zero
505 Non-zero status will cause the transaction to be rolled back and
502 status will cause the transaction to be rolled back and the push,
506 the push, pull or unbundle will fail. URL that was source of
503 pull or unbundle will fail. URL that was source of changes is in
507 changes is in $HG_URL.
504 $HG_URL.
508 pretxncommit;;
505 pretxncommit;;
509 Run after a changeset has been created but the transaction not yet
506 Run after a changeset has been created but the transaction not yet
510 committed. Changeset is visible to hook program. This lets you
507 committed. Changeset is visible to hook program. This lets you
@@ -518,43 +515,40 b' hooks::'
518 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
515 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
519 of second new parent is in $HG_PARENT2.
516 of second new parent is in $HG_PARENT2.
520 tag;;
517 tag;;
521 Run after a tag is created. ID of tagged changeset is in
518 Run after a tag is created. ID of tagged changeset is in $HG_NODE.
522 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
519 Name of tag is in $HG_TAG. Tag is local if $HG_LOCAL=1, in repo if
523 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
520 $HG_LOCAL=0.
524 update;;
521 update;;
525 Run after updating the working directory. Changeset ID of first
522 Run after updating the working directory. Changeset ID of first
526 new parent is in $HG_PARENT1. If merge, ID of second new parent
523 new parent is in $HG_PARENT1. If merge, ID of second new parent is
527 is in $HG_PARENT2. If the update succeeded, $HG_ERROR=0. If the
524 in $HG_PARENT2. If the update succeeded, $HG_ERROR=0. If the
528 update failed (e.g. because conflicts not resolved), $HG_ERROR=1.
525 update failed (e.g. because conflicts not resolved), $HG_ERROR=1.
529
526
530 Note: it is generally better to use standard hooks rather
527 Note: it is generally better to use standard hooks rather than the
531 than the generic pre- and post- command hooks as they are
528 generic pre- and post- command hooks as they are guaranteed to be
532 guaranteed to be called in the appropriate contexts for
529 called in the appropriate contexts for influencing transactions.
533 influencing transactions. Also, hooks like "commit" will be
530 Also, hooks like "commit" will be called in all contexts that
534 called in all contexts that generate a commit (e.g. tag) and
531 generate a commit (e.g. tag) and not just the commit command.
535 not just the commit command.
536
532
537 Note2: Environment variables with empty values may not be
533 Note2: Environment variables with empty values may not be passed to
538 passed to hooks on platforms such as Windows. As an
534 hooks on platforms such as Windows. As an example, $HG_PARENT2 will
539 example, $HG_PARENT2 will have an empty value under
535 have an empty value under Unix-like platforms for non-merge
540 Unix-like platforms for non-merge changesets, while it
536 changesets, while it will not be available at all under Windows.
541 will not be available at all under Windows.
542
537
543 The syntax for Python hooks is as follows:
538 The syntax for Python hooks is as follows:
544
539
545 hookname = python:modulename.submodule.callable
540 hookname = python:modulename.submodule.callable
546 hookname = python:/path/to/python/module.py:callable
541 hookname = python:/path/to/python/module.py:callable
547
542
548 Python hooks are run within the Mercurial process. Each hook
543 Python hooks are run within the Mercurial process. Each hook is
549 is called with at least three keyword arguments: a ui object
544 called with at least three keyword arguments: a ui object (keyword
550 (keyword "ui"), a repository object (keyword "repo"), and a
545 "ui"), a repository object (keyword "repo"), and a "hooktype"
551 "hooktype" keyword that tells what kind of hook is used.
546 keyword that tells what kind of hook is used. Arguments listed as
552 Arguments listed as environment variables above are passed as
547 environment variables above are passed as keyword arguments, with no
553 keyword arguments, with no "HG_" prefix, and names in lower
548 "HG_" prefix, and names in lower case.
554 case.
555
549
556 If a Python hook returns a "true" value or raises an
550 If a Python hook returns a "true" value or raises an exception, this
557 exception, this is treated as a failure.
551 is treated as a failure.
558
552
559 [[http_proxy]]
553 [[http_proxy]]
560 http_proxy::
554 http_proxy::
@@ -582,53 +576,53 b' smtp::'
582 Optional. Whether to connect to mail server using TLS. True or
576 Optional. Whether to connect to mail server using TLS. True or
583 False. Default: False.
577 False. Default: False.
584 username;;
578 username;;
585 Optional. User name to authenticate to SMTP server with.
579 Optional. User name to authenticate to SMTP server with. If
586 If username is specified, password must also be specified.
580 username is specified, password must also be specified.
587 Default: none.
581 Default: none.
588 password;;
582 password;;
589 Optional. Password to authenticate to SMTP server with.
583 Optional. Password to authenticate to SMTP server with. If
590 If username is specified, password must also be specified.
584 username is specified, password must also be specified.
591 Default: none.
585 Default: none.
592 local_hostname;;
586 local_hostname;;
593 Optional. It's the hostname that the sender can use to identify itself
587 Optional. It's the hostname that the sender can use to identify
594 to the MTA.
588 itself to the MTA.
595
589
596 [[paths]]
590 [[paths]]
597 paths::
591 paths::
598 Assigns symbolic names to repositories. The left side is the
592 Assigns symbolic names to repositories. The left side is the
599 symbolic name, and the right gives the directory or URL that is the
593 symbolic name, and the right gives the directory or URL that is the
600 location of the repository. Default paths can be declared by
594 location of the repository. Default paths can be declared by setting
601 setting the following entries.
595 the following entries.
602 default;;
596 default;;
603 Directory or URL to use when pulling if no source is specified.
597 Directory or URL to use when pulling if no source is specified.
604 Default is set to repository from which the current repository
598 Default is set to repository from which the current repository was
605 was cloned.
599 cloned.
606 default-push;;
600 default-push;;
607 Optional. Directory or URL to use when pushing if no destination
601 Optional. Directory or URL to use when pushing if no destination
608 is specified.
602 is specified.
609
603
610 [[profiling]]
604 [[profiling]]
611 profiling::
605 profiling::
612 Specifies profiling format and file output.
606 Specifies profiling format and file output. In this section
613 In this section description, 'profiling data' stands for the raw data
607 description, 'profiling data' stands for the raw data collected
614 collected during profiling, while 'profiling report' stands for a
608 during profiling, while 'profiling report' stands for a statistical
615 statistical text report generated from the profiling data.
609 text report generated from the profiling data. The profiling is done
616 The profiling is done using lsprof.
610 using lsprof.
617 format;;
611 format;;
618 Profiling format.
612 Profiling format.
619 Default: text.
613 Default: text.
620 text;;
614 text;;
621 Generate a profiling report.
615 Generate a profiling report. When saving to a file, it should be
622 When saving to a file, it should be noted that only the report is saved,
616 noted that only the report is saved, and the profiling data is
623 and the profiling data is not kept.
617 not kept.
624 kcachegrind;;
618 kcachegrind;;
625 Format profiling data for kcachegrind use:
619 Format profiling data for kcachegrind use: when saving to a
626 when saving to a file, the generated file can directly be loaded
620 file, the generated file can directly be loaded into
627 into kcachegrind.
621 kcachegrind.
628 output;;
622 output;;
629 File path where profiling data or report should be saved.
623 File path where profiling data or report should be saved. If the
630 If the file exists, it is replaced.
624 file exists, it is replaced. Default: None, data is printed on
631 Default: None, data is printed on stderr
625 stderr
632
626
633 [[server]]
627 [[server]]
634 server::
628 server::
@@ -645,15 +639,15 b' server::'
645
639
646 [[trusted]]
640 [[trusted]]
647 trusted::
641 trusted::
648 For security reasons, Mercurial will not use the settings in
642 For security reasons, Mercurial will not use the settings in the
649 the .hg/hgrc file from a repository if it doesn't belong to a
643 .hg/hgrc file from a repository if it doesn't belong to a trusted
650 trusted user or to a trusted group. The main exception is the
644 user or to a trusted group. The main exception is the web interface,
651 web interface, which automatically uses some safe settings, since
645 which automatically uses some safe settings, since it's common to
652 it's common to serve repositories from different users.
646 serve repositories from different users.
653
647
654 This section specifies what users and groups are trusted. The
648 This section specifies what users and groups are trusted. The
655 current user is always trusted. To trust everybody, list a user
649 current user is always trusted. To trust everybody, list a user or a
656 or a group with name "*".
650 group with name "*".
657
651
658 users;;
652 users;;
659 Comma-separated list of trusted users.
653 Comma-separated list of trusted users.
@@ -665,13 +659,13 b' ui::'
665 User interface controls.
659 User interface controls.
666 archivemeta;;
660 archivemeta;;
667 Whether to include the .hg_archival.txt file containing metadata
661 Whether to include the .hg_archival.txt file containing metadata
668 (hashes for the repository base and for tip) in archives created by
662 (hashes for the repository base and for tip) in archives created
669 the hg archive command or downloaded via hgweb.
663 by the hg archive command or downloaded via hgweb.
670 Default is true.
664 Default is true.
671 askusername;;
665 askusername;;
672 Whether to prompt for a username when committing. If True, and
666 Whether to prompt for a username when committing. If True, and
673 neither $HGUSER nor $EMAIL has been specified, then the user will
667 neither $HGUSER nor $EMAIL has been specified, then the user will
674 be prompted to enter a username. If no username is entered, the
668 be prompted to enter a username. If no username is entered, the
675 default USER@HOST is used instead.
669 default USER@HOST is used instead.
676 Default is False.
670 Default is False.
677 debug;;
671 debug;;
@@ -682,10 +676,10 b' ui::'
682 Encoding to try if it's not possible to decode the changelog using
676 Encoding to try if it's not possible to decode the changelog using
683 UTF-8. Default is ISO-8859-1.
677 UTF-8. Default is ISO-8859-1.
684 ignore;;
678 ignore;;
685 A file to read per-user ignore patterns from. This file should be in
679 A file to read per-user ignore patterns from. This file should be
686 the same format as a repository-wide .hgignore file. This option
680 in the same format as a repository-wide .hgignore file. This
687 supports hook syntax, so if you want to specify multiple ignore
681 option supports hook syntax, so if you want to specify multiple
688 files, you can do so by setting something like
682 ignore files, you can do so by setting something like
689 "ignore.other = ~/.hgignore2". For details of the ignore file
683 "ignore.other = ~/.hgignore2". For details of the ignore file
690 format, see the hgignore(5) man page.
684 format, see the hgignore(5) man page.
691 interactive;;
685 interactive;;
@@ -709,8 +703,8 b' ui::'
709 merge-tools section.
703 merge-tools section.
710
704
711 patch;;
705 patch;;
712 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
706 command to use to apply patches. Look for 'gpatch' or 'patch' in
713 unset.
707 PATH if unset.
714 quiet;;
708 quiet;;
715 Reduce the amount of output printed. True or False. Default is False.
709 Reduce the amount of output printed. True or False. Default is False.
716 remotecmd;;
710 remotecmd;;
@@ -720,8 +714,9 b' ui::'
720 trusted user or group. True or False. Default is True.
714 trusted user or group. True or False. Default is True.
721 slash;;
715 slash;;
722 Display paths using a slash ("/") as the path separator. This only
716 Display paths using a slash ("/") as the path separator. This only
723 makes a difference on systems where the default path separator is not
717 makes a difference on systems where the default path separator is
724 the slash character (e.g. Windows uses the backslash character ("\")).
718 not the slash character (e.g. Windows uses the backslash character
719 ("\")).
725 Default is False.
720 Default is False.
726 ssh;;
721 ssh;;
727 command to use for SSH connections. Default is 'ssh'.
722 command to use for SSH connections. Default is 'ssh'.
@@ -736,10 +731,10 b' ui::'
736 username;;
731 username;;
737 The committer of a changeset created when running "commit".
732 The committer of a changeset created when running "commit".
738 Typically a person's name and email address, e.g. "Fred Widget
733 Typically a person's name and email address, e.g. "Fred Widget
739 <fred@example.com>". Default is $EMAIL or username@hostname.
734 <fred@example.com>". Default is $EMAIL or username@hostname. If
740 If the username in hgrc is empty, it has to be specified manually or
735 the username in hgrc is empty, it has to be specified manually or
741 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set "username ="
736 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set
742 in the system hgrc).
737 "username =" in the system hgrc).
743 verbose;;
738 verbose;;
744 Increase the amount of output printed. True or False. Default is False.
739 Increase the amount of output printed. True or False. Default is False.
745
740
@@ -764,51 +759,55 b' web::'
764 Whether to allow pulling from the repository. Default is true.
759 Whether to allow pulling from the repository. Default is true.
765 allow_push;;
760 allow_push;;
766 Whether to allow pushing to the repository. If empty or not set,
761 Whether to allow pushing to the repository. If empty or not set,
767 push is not allowed. If the special value "*", any remote user
762 push is not allowed. If the special value "*", any remote user can
768 can push, including unauthenticated users. Otherwise, the remote
763 push, including unauthenticated users. Otherwise, the remote user
769 user must have been authenticated, and the authenticated user name
764 must have been authenticated, and the authenticated user name must
770 must be present in this list (separated by whitespace or ",").
765 be present in this list (separated by whitespace or ","). The
771 The contents of the allow_push list are examined after the
766 contents of the allow_push list are examined after the deny_push
772 deny_push list.
767 list.
773 allow_read;;
768 allow_read;;
774 If the user has not already been denied repository access due to the
769 If the user has not already been denied repository access due to
775 contents of deny_read, this list determines whether to grant repository
770 the contents of deny_read, this list determines whether to grant
776 access to the user. If this list is not empty, and the user is
771 repository access to the user. If this list is not empty, and the
777 unauthenticated or not present in the list (separated by whitespace or ","),
772 user is unauthenticated or not present in the list (separated by
778 then access is denied for the user. If the list is empty or not set, then
773 whitespace or ","), then access is denied for the user. If the
779 access is permitted to all users by default. Setting allow_read to the
774 list is empty or not set, then access is permitted to all users by
780 special value "*" is equivalent to it not being set (i.e. access is
775 default. Setting allow_read to the special value "*" is equivalent
781 permitted to all users). The contents of the allow_read list are examined
776 to it not being set (i.e. access is permitted to all users). The
782 after the deny_read list.
777 contents of the allow_read list are examined after the deny_read
778 list.
783 allowzip;;
779 allowzip;;
784 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
780 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
785 Default is false. This feature creates temporary files.
781 Default is false. This feature creates temporary files.
786 baseurl;;
782 baseurl;;
787 Base URL to use when publishing URLs in other locations, so
783 Base URL to use when publishing URLs in other locations, so
788 third-party tools like email notification hooks can construct URLs.
784 third-party tools like email notification hooks can construct
789 Example: "http://hgserver/repos/"
785 URLs. Example: "http://hgserver/repos/"
790 contact;;
786 contact;;
791 Name or email address of the person in charge of the repository.
787 Name or email address of the person in charge of the repository.
792 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
788 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
793 deny_push;;
789 deny_push;;
794 Whether to deny pushing to the repository. If empty or not set,
790 Whether to deny pushing to the repository. If empty or not set,
795 push is not denied. If the special value "*", all remote users
791 push is not denied. If the special value "*", all remote users are
796 are denied push. Otherwise, unauthenticated users are all denied,
792 denied push. Otherwise, unauthenticated users are all denied, and
797 and any authenticated user name present in this list (separated by
793 any authenticated user name present in this list (separated by
798 whitespace or ",") is also denied. The contents of the deny_push
794 whitespace or ",") is also denied. The contents of the deny_push
799 list are examined before the allow_push list.
795 list are examined before the allow_push list.
800 deny_read;;
796 deny_read;;
801 Whether to deny reading/viewing of the repository. If this list is not
797 Whether to deny reading/viewing of the repository. If this list is
802 empty, unauthenticated users are all denied, and any authenticated user name
798 not empty, unauthenticated users are all denied, and any
803 present in this list (separated by whitespace or ",") is also denied access
799 authenticated user name present in this list (separated by
804 to the repository. If set to the special value "*", all remote users are
800 whitespace or ",") is also denied access to the repository. If set
805 denied access (rarely needed ;). If deny_read is empty or not set, the
801 to the special value "*", all remote users are denied access
806 determination of repository access depends on the presence and content of
802 (rarely needed ;). If deny_read is empty or not set, the
807 the allow_read list (see description). If both deny_read and allow_read are
803 determination of repository access depends on the presence and
808 empty or not set, then access is permitted to all users by default. If the
804 content of the allow_read list (see description). If both
809 repository is being served via hgwebdir, denied users will not be able to
805 deny_read and allow_read are empty or not set, then access is
810 see it in the list of repositories. The contents of the deny_read list have
806 permitted to all users by default. If the repository is being
811 priority over (are examined before) the contents of the allow_read list.
807 served via hgwebdir, denied users will not be able to see it in
808 the list of repositories. The contents of the deny_read list have
809 priority over (are examined before) the contents of the allow_read
810 list.
812 description;;
811 description;;
813 Textual description of the repository's purpose or contents.
812 Textual description of the repository's purpose or contents.
814 Default is "unknown".
813 Default is "unknown".
@@ -818,7 +817,8 b' web::'
818 errorlog;;
817 errorlog;;
819 Where to output the error log. Default is stderr.
818 Where to output the error log. Default is stderr.
820 hidden;;
819 hidden;;
821 Whether to hide the repository in the hgwebdir index. Default is false.
820 Whether to hide the repository in the hgwebdir index.
821 Default is false.
822 ipv6;;
822 ipv6;;
823 Whether to use IPv6. Default is false.
823 Whether to use IPv6. Default is false.
824 name;;
824 name;;
@@ -836,9 +836,9 b' web::'
836 Whether to require that inbound pushes be transported over SSL to
836 Whether to require that inbound pushes be transported over SSL to
837 prevent password sniffing. Default is true.
837 prevent password sniffing. Default is true.
838 staticurl;;
838 staticurl;;
839 Base URL to use for static files. If unset, static files (e.g.
839 Base URL to use for static files. If unset, static files (e.g. the
840 the hgicon.png favicon) will be served by the CGI script itself.
840 hgicon.png favicon) will be served by the CGI script itself. Use
841 Use this setting to serve them directly with the HTTP server.
841 this setting to serve them directly with the HTTP server.
842 Example: "http://hgserver/static/"
842 Example: "http://hgserver/static/"
843 stripes;;
843 stripes;;
844 How many lines a "zebra stripe" should span in multiline output.
844 How many lines a "zebra stripe" should span in multiline output.
General Comments 0
You need to be logged in to leave comments. Login now