Mercurial > hg
comparison doc/hgrc.5.txt @ 8769:a5d0e821ab77
hgrc.5: reformatted to avoid big chunks of monospaced text
The man page used to have lines longer than 80 characters, even though
all lines in the hgrc.5.txt file were wrapped nicely. The problem
turned out to be that the indented paragraphs started literal blocks
instead of normal paragraphs. The literal blocks were of course not
wrapped when displayed by man.
In short, the asciidoc rules require lists to be formatted like this:
foo::
Some description of foo.
+
Another paragraph in the description of foo. It *must* start flush
left and the plus is necessary to indicate that this is a list item
continuation.
Lists with nested lists can be formatted correctly using something
called "open blocks". These blocks are used to group the list items
and are marked by a line above and below with two dashes. See the
asciidoc user guide for the gory details...
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 10 Jun 2009 00:06:20 +0200 |
parents | 8ab07f3e0bad |
children | cc00191314a7 |
comparison
equal
deleted
inserted
replaced
8768:8ab07f3e0bad | 8769:a5d0e821ab77 |
---|---|
102 alias:: | 102 alias:: |
103 Defines command aliases. | 103 Defines command aliases. |
104 Aliases allow you to define your own commands in terms of other | 104 Aliases allow you to define your own commands in terms of other |
105 commands (or aliases), optionally including arguments. | 105 commands (or aliases), optionally including arguments. |
106 + | 106 + |
107 -- | |
107 Alias definitions consist of lines of the form: | 108 Alias definitions consist of lines of the form: |
108 + | 109 |
109 <alias> = <command> [<argument]... | 110 <alias> = <command> [<argument]... |
110 + | 111 |
111 For example, this definition: | 112 For example, this definition: |
112 + | 113 |
113 latest = log --limit 5 | 114 latest = log --limit 5 |
114 + | 115 |
115 creates a new command `latest` that shows only the five most recent | 116 creates a new command `latest` that shows only the five most recent |
116 changesets. You can define subsequent aliases using earlier ones: | 117 changesets. You can define subsequent aliases using earlier ones: |
117 + | 118 |
118 stable5 = latest -b stable | 119 stable5 = latest -b stable |
119 + | 120 |
120 *Note*: It is possible to create aliases with the same names as | 121 *Note*: It is possible to create aliases with the same names as |
121 existing commands, which will then override the original definitions. | 122 existing commands, which will then override the original definitions. |
122 This is almost always a bad idea! | 123 This is almost always a bad idea! |
124 -- | |
123 | 125 |
124 [[auth]] | 126 [[auth]] |
125 auth:: | 127 auth:: |
126 Authentication credentials for HTTP authentication. Each line has | 128 Authentication credentials for HTTP authentication. Each line has |
127 the following format: | 129 the following format: |
128 | 130 |
129 <name>.<argument> = <value> | 131 <name>.<argument> = <value> |
130 | 132 + |
131 where <name> is used to group arguments into authentication entries. | 133 -- |
132 Example: | 134 where <name> is used to group arguments into authentication entries. |
135 Example: | |
133 | 136 |
134 foo.prefix = hg.intevation.org/mercurial | 137 foo.prefix = hg.intevation.org/mercurial |
135 foo.username = foo | 138 foo.username = foo |
136 foo.password = bar | 139 foo.password = bar |
137 foo.schemes = http https | 140 foo.schemes = http https |
138 | 141 |
139 Supported arguments: | 142 Supported arguments: |
140 | 143 |
141 prefix;; | 144 prefix;; |
142 Either "`*`" or a URI prefix with or without the scheme part. The | 145 Either "`*`" or a URI prefix with or without the scheme part. The |
143 authentication entry with the longest matching prefix is used | 146 authentication entry with the longest matching prefix is used |
144 (where "`*`" matches everything and counts as a match of length 1). | 147 (where "`*`" matches everything and counts as a match of length 1). |
155 authentication entry with. Only used if the prefix doesn't include | 158 authentication entry with. Only used if the prefix doesn't include |
156 a scheme. Supported schemes are http and https. They will match | 159 a scheme. Supported schemes are http and https. They will match |
157 static-http and static-https respectively, as well. | 160 static-http and static-https respectively, as well. |
158 Default: https. | 161 Default: https. |
159 | 162 |
160 If no suitable authentication entry is found, the user is prompted | 163 If no suitable authentication entry is found, the user is prompted |
161 for credentials as usual if required by the remote. | 164 for credentials as usual if required by the remote. |
165 -- | |
162 | 166 |
163 [[decode]] | 167 [[decode]] |
164 decode/encode:: | 168 decode/encode:: |
165 Filters for transforming files on checkout/checkin. This would | 169 Filters for transforming files on checkout/checkin. This would |
166 typically be used for newline processing or other | 170 typically be used for newline processing or other |
167 localization/canonicalization of files. | 171 localization/canonicalization of files. |
168 | 172 + |
169 Filters consist of a filter pattern followed by a filter command. | 173 -- |
170 Filter patterns are globs by default, rooted at the repository root. | 174 Filters consist of a filter pattern followed by a filter command. |
171 For example, to match any file ending in "`.txt`" in the root | 175 Filter patterns are globs by default, rooted at the repository root. |
172 directory only, use the pattern "`*.txt`". To match any file ending in | 176 For example, to match any file ending in "`.txt`" in the root |
173 "`.c`" anywhere in the repository, use the pattern "`**.c`". | 177 directory only, use the pattern "`*.txt`". To match any file ending in |
174 | 178 "`.c`" anywhere in the repository, use the pattern "`**.c`". |
175 The filter command can start with a specifier, either "pipe:" or | 179 |
176 "tempfile:". If no specifier is given, "pipe:" is used by default. | 180 The filter command can start with a specifier, either "pipe:" or |
177 | 181 "tempfile:". If no specifier is given, "pipe:" is used by default. |
178 A "pipe:" command must accept data on stdin and return the | 182 |
179 transformed data on stdout. | 183 A "pipe:" command must accept data on stdin and return the |
180 | 184 transformed data on stdout. |
181 Pipe example: | 185 |
182 | 186 Pipe example: |
183 [encode] | 187 |
184 # uncompress gzip files on checkin to improve delta compression | 188 [encode] |
185 # note: not necessarily a good idea, just an example | 189 # uncompress gzip files on checkin to improve delta compression |
186 *.gz = pipe: gunzip | 190 # note: not necessarily a good idea, just an example |
187 | 191 *.gz = pipe: gunzip |
188 [decode] | 192 |
189 # recompress gzip files when writing them to the working dir (we | 193 [decode] |
190 # can safely omit "pipe:", because it's the default) | 194 # recompress gzip files when writing them to the working dir (we |
191 *.gz = gzip | 195 # can safely omit "pipe:", because it's the default) |
192 | 196 *.gz = gzip |
193 A "tempfile:" command is a template. The string INFILE is replaced | 197 |
194 with the name of a temporary file that contains the data to be | 198 A "tempfile:" command is a template. The string INFILE is replaced |
195 filtered by the command. The string OUTFILE is replaced with the | 199 with the name of a temporary file that contains the data to be |
196 name of an empty temporary file, where the filtered data must be | 200 filtered by the command. The string OUTFILE is replaced with the |
197 written by the command. | 201 name of an empty temporary file, where the filtered data must be |
198 | 202 written by the command. |
199 NOTE: the tempfile mechanism is recommended for Windows systems, | 203 |
200 where the standard shell I/O redirection operators often have | 204 NOTE: the tempfile mechanism is recommended for Windows systems, |
201 strange effects and may corrupt the contents of your files. | 205 where the standard shell I/O redirection operators often have |
202 | 206 strange effects and may corrupt the contents of your files. |
203 The most common usage is for LF <-> CRLF translation on Windows. For | 207 |
204 this, use the "smart" convertors which check for binary files: | 208 The most common usage is for LF <-> CRLF translation on Windows. For |
205 | 209 this, use the "smart" convertors which check for binary files: |
206 [extensions] | 210 |
207 hgext.win32text = | 211 [extensions] |
208 [encode] | 212 hgext.win32text = |
209 ** = cleverencode: | 213 [encode] |
210 [decode] | 214 ** = cleverencode: |
211 ** = cleverdecode: | 215 [decode] |
212 | 216 ** = cleverdecode: |
213 or if you only want to translate certain files: | 217 |
214 | 218 or if you only want to translate certain files: |
215 [extensions] | 219 |
216 hgext.win32text = | 220 [extensions] |
217 [encode] | 221 hgext.win32text = |
218 **.txt = dumbencode: | 222 [encode] |
219 [decode] | 223 **.txt = dumbencode: |
220 **.txt = dumbdecode: | 224 [decode] |
225 **.txt = dumbdecode: | |
226 -- | |
221 | 227 |
222 [[defaults]] | 228 [[defaults]] |
223 defaults:: | 229 defaults:: |
224 Use the [defaults] section to define command defaults, i.e. the | 230 Use the [defaults] section to define command defaults, i.e. the |
225 default options/arguments to pass to the specified commands. | 231 default options/arguments to pass to the specified commands. |
226 | 232 + |
227 The following example makes 'hg log' run in verbose mode, and 'hg | 233 -- |
228 status' show only the modified files, by default. | 234 The following example makes 'hg log' run in verbose mode, and 'hg |
229 | 235 status' show only the modified files, by default. |
230 [defaults] | 236 |
231 log = -v | 237 [defaults] |
232 status = -m | 238 log = -v |
233 | 239 status = -m |
234 The actual commands, instead of their aliases, must be used when | 240 |
235 defining command defaults. The command defaults will also be applied | 241 The actual commands, instead of their aliases, must be used when |
236 to the aliases of the commands defined. | 242 defining command defaults. The command defaults will also be applied |
243 to the aliases of the commands defined. | |
244 -- | |
237 | 245 |
238 [[diff]] | 246 [[diff]] |
239 diff:: | 247 diff:: |
240 Settings used when displaying diffs. They are all boolean and | 248 Settings used when displaying diffs. They are all boolean and |
241 defaults to False. | 249 defaults to False. |
278 for recipients. Addresses, headers, and parts not containing | 286 for recipients. Addresses, headers, and parts not containing |
279 patches of outgoing messages will be encoded in the first charset | 287 patches of outgoing messages will be encoded in the first charset |
280 to which conversion from local encoding (`$HGENCODING`, | 288 to which conversion from local encoding (`$HGENCODING`, |
281 `ui.fallbackencoding`) succeeds. If correct conversion fails, the | 289 `ui.fallbackencoding`) succeeds. If correct conversion fails, the |
282 text in question is sent as is. Defaults to empty (explicit) list. | 290 text in question is sent as is. Defaults to empty (explicit) list. |
283 | 291 + |
284 Order of outgoing email charsets: | 292 -- |
285 | 293 Order of outgoing email charsets: |
286 us-ascii always first, regardless of settings | 294 |
287 email.charsets in order given by user | 295 us-ascii always first, regardless of settings |
288 ui.fallbackencoding if not in email.charsets | 296 email.charsets in order given by user |
289 $HGENCODING if not in email.charsets | 297 ui.fallbackencoding if not in email.charsets |
290 utf-8 always last, regardless of settings | 298 $HGENCODING if not in email.charsets |
291 | 299 utf-8 always last, regardless of settings |
292 Email example: | 300 |
293 | 301 Email example: |
294 [email] | 302 |
295 from = Joseph User <joe.user@example.com> | 303 [email] |
296 method = /usr/sbin/sendmail | 304 from = Joseph User <joe.user@example.com> |
297 # charsets for western europeans | 305 method = /usr/sbin/sendmail |
298 # us-ascii, utf-8 omitted, as they are tried first and last | 306 # charsets for western europeans |
299 charsets = iso-8859-1, iso-8859-15, windows-1252 | 307 # us-ascii, utf-8 omitted, as they are tried first and last |
308 charsets = iso-8859-1, iso-8859-15, windows-1252 | |
309 -- | |
300 | 310 |
301 [[extensions]] | 311 [[extensions]] |
302 extensions:: | 312 extensions:: |
303 Mercurial has an extension mechanism for adding new features. To | 313 Mercurial has an extension mechanism for adding new features. To |
304 enable an extension, create an entry for it in this section. | 314 enable an extension, create an entry for it in this section. |
305 | 315 + |
306 If you know that the extension is already in Python's search path, | 316 -- |
307 you can give the name of the module, followed by "=", with nothing | 317 If you know that the extension is already in Python's search path, |
308 after the "=". | 318 you can give the name of the module, followed by "=", with nothing |
309 | 319 after the "=". |
310 Otherwise, give a name that you choose, followed by "=", followed by | 320 |
311 the path to the ".py" file (including the file name extension) that | 321 Otherwise, give a name that you choose, followed by "=", followed by |
312 defines the extension. | 322 the path to the ".py" file (including the file name extension) that |
313 | 323 defines the extension. |
314 To explicitly disable an extension that is enabled in an hgrc of | 324 |
315 broader scope, prepend its path with '!', as in | 325 To explicitly disable an extension that is enabled in an hgrc of |
316 'hgext.foo = !/ext/path' or 'hgext.foo = !' when path is not | 326 broader scope, prepend its path with '!', as in |
317 supplied. | 327 'hgext.foo = !/ext/path' or 'hgext.foo = !' when path is not |
318 | 328 supplied. |
319 Example for `~/.hgrc`: | 329 |
320 | 330 Example for `~/.hgrc`: |
321 [extensions] | 331 |
322 # (the mq extension will get loaded from mercurial's path) | 332 [extensions] |
323 hgext.mq = | 333 # (the mq extension will get loaded from mercurial's path) |
324 # (this extension will get loaded from the file specified) | 334 hgext.mq = |
325 myfeature = ~/.hgext/myfeature.py | 335 # (this extension will get loaded from the file specified) |
336 myfeature = ~/.hgext/myfeature.py | |
337 -- | |
326 | 338 |
327 [[format]] | 339 [[format]] |
328 format:: | 340 format:: |
329 | 341 |
330 usestore;; | 342 usestore;; |
347 merge-patterns:: | 359 merge-patterns:: |
348 This section specifies merge tools to associate with particular file | 360 This section specifies merge tools to associate with particular file |
349 patterns. Tools matched here will take precedence over the default | 361 patterns. Tools matched here will take precedence over the default |
350 merge tool. Patterns are globs by default, rooted at the repository | 362 merge tool. Patterns are globs by default, rooted at the repository |
351 root. | 363 root. |
352 | 364 + |
353 Example: | 365 Example: |
354 | 366 + |
355 [merge-patterns] | 367 [merge-patterns] |
356 **.c = kdiff3 | 368 **.c = kdiff3 |
357 **.jpg = myimgmerge | 369 **.jpg = myimgmerge |
358 | 370 |
359 [[merge-tools]] | 371 [[merge-tools]] |
360 merge-tools:: | 372 merge-tools:: |
361 This section configures external merge tools to use for file-level | 373 This section configures external merge tools to use for file-level |
362 merges. | 374 merges. |
363 | 375 + |
364 Example `~/.hgrc`: | 376 -- |
365 | 377 Example `~/.hgrc`: |
366 [merge-tools] | 378 |
367 # Override stock tool location | 379 [merge-tools] |
368 kdiff3.executable = ~/bin/kdiff3 | 380 # Override stock tool location |
369 # Specify command line | 381 kdiff3.executable = ~/bin/kdiff3 |
370 kdiff3.args = $base $local $other -o $output | 382 # Specify command line |
371 # Give higher priority | 383 kdiff3.args = $base $local $other -o $output |
372 kdiff3.priority = 1 | 384 # Give higher priority |
373 | 385 kdiff3.priority = 1 |
374 # Define new tool | 386 |
375 myHtmlTool.args = -m $local $other $base $output | 387 # Define new tool |
376 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | 388 myHtmlTool.args = -m $local $other $base $output |
377 myHtmlTool.priority = 1 | 389 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
378 | 390 myHtmlTool.priority = 1 |
379 Supported arguments: | 391 |
380 | 392 Supported arguments: |
381 priority;; | 393 |
382 The priority in which to evaluate this tool. | 394 priority;; |
383 Default: 0. | 395 The priority in which to evaluate this tool. |
384 executable;; | 396 Default: 0. |
385 Either just the name of the executable or its pathname. | 397 executable;; |
386 Default: the tool name. | 398 Either just the name of the executable or its pathname. |
387 args;; | 399 Default: the tool name. |
388 The arguments to pass to the tool executable. You can refer to the | 400 args;; |
389 files being merged as well as the output file through these | 401 The arguments to pass to the tool executable. You can refer to the |
390 variables: `$base`, `$local`, `$other`, `$output`. | 402 files being merged as well as the output file through these |
391 Default: `$local $base $other` | 403 variables: `$base`, `$local`, `$other`, `$output`. |
392 premerge;; | 404 Default: `$local $base $other` |
393 Attempt to run internal non-interactive 3-way merge tool before | 405 premerge;; |
394 launching external tool. | 406 Attempt to run internal non-interactive 3-way merge tool before |
395 Default: True | 407 launching external tool. |
396 binary;; | 408 Default: True |
397 This tool can merge binary files. Defaults to False, unless tool | 409 binary;; |
398 was selected by file pattern match. | 410 This tool can merge binary files. Defaults to False, unless tool |
399 symlink;; | 411 was selected by file pattern match. |
400 This tool can merge symlinks. Defaults to False, even if tool was | 412 symlink;; |
401 selected by file pattern match. | 413 This tool can merge symlinks. Defaults to False, even if tool was |
402 checkconflicts;; | 414 selected by file pattern match. |
403 Check whether there are conflicts even though the tool reported | 415 checkconflicts;; |
404 success. | 416 Check whether there are conflicts even though the tool reported |
405 Default: False | 417 success. |
406 checkchanged;; | 418 Default: False |
407 Check whether outputs were written even though the tool reported | 419 checkchanged;; |
408 success. | 420 Check whether outputs were written even though the tool reported |
409 Default: False | 421 success. |
410 fixeol;; | 422 Default: False |
411 Attempt to fix up EOL changes caused by the merge tool. | 423 fixeol;; |
412 Default: False | 424 Attempt to fix up EOL changes caused by the merge tool. |
413 gui;; | 425 Default: False |
414 This tool requires a graphical interface to run. Default: False | 426 gui;; |
415 regkey;; | 427 This tool requires a graphical interface to run. Default: False |
416 Windows registry key which describes install location of this | 428 regkey;; |
417 tool. Mercurial will search for this key first under | 429 Windows registry key which describes install location of this |
418 `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`. | 430 tool. Mercurial will search for this key first under |
419 Default: None | 431 `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`. |
420 regname;; | 432 Default: None |
421 Name of value to read from specified registry key. Defaults to the | 433 regname;; |
422 unnamed (default) value. | 434 Name of value to read from specified registry key. Defaults to the |
423 regappend;; | 435 unnamed (default) value. |
424 String to append to the value read from the registry, typically | 436 regappend;; |
425 the executable name of the tool. | 437 String to append to the value read from the registry, typically |
426 Default: None | 438 the executable name of the tool. |
439 Default: None | |
440 -- | |
427 | 441 |
428 [[hooks]] | 442 [[hooks]] |
429 hooks:: | 443 hooks:: |
430 Commands or Python functions that get automatically executed by | 444 Commands or Python functions that get automatically executed by |
431 various actions such as starting or finishing a commit. Multiple | 445 various actions such as starting or finishing a commit. Multiple |
432 hooks can be run for the same action by appending a suffix to the | 446 hooks can be run for the same action by appending a suffix to the |
433 action. Overriding a site-wide hook can be done by changing its | 447 action. Overriding a site-wide hook can be done by changing its |
434 value or setting it to an empty string. | 448 value or setting it to an empty string. |
435 | 449 + |
436 Example `.hg/hgrc`: | 450 -- |
437 | 451 Example `.hg/hgrc`: |
438 [hooks] | 452 |
439 # do not use the site-wide hook | 453 [hooks] |
440 incoming = | 454 # do not use the site-wide hook |
441 incoming.email = /my/email/hook | 455 incoming = |
442 incoming.autobuild = /my/build/hook | 456 incoming.email = /my/email/hook |
443 | 457 incoming.autobuild = /my/build/hook |
444 Most hooks are run with environment variables set that give useful | 458 |
445 additional information. For each hook below, the environment | 459 Most hooks are run with environment variables set that give useful |
446 variables it is passed are listed with names of the form "$HG_foo". | 460 additional information. For each hook below, the environment |
447 | 461 variables it is passed are listed with names of the form "$HG_foo". |
448 changegroup;; | 462 |
449 Run after a changegroup has been added via push, pull or unbundle. | 463 changegroup;; |
450 ID of the first new changeset is in `$HG_NODE`. URL from which | 464 Run after a changegroup has been added via push, pull or unbundle. |
451 changes came is in `$HG_URL`. | 465 ID of the first new changeset is in `$HG_NODE`. URL from which |
452 commit;; | 466 changes came is in `$HG_URL`. |
453 Run after a changeset has been created in the local repository. ID | 467 commit;; |
454 of the newly created changeset is in `$HG_NODE`. Parent changeset | 468 Run after a changeset has been created in the local repository. ID |
455 IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | 469 of the newly created changeset is in `$HG_NODE`. Parent changeset |
456 incoming;; | 470 IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
457 Run after a changeset has been pulled, pushed, or unbundled into | 471 incoming;; |
458 the local repository. The ID of the newly arrived changeset is in | 472 Run after a changeset has been pulled, pushed, or unbundled into |
459 `$HG_NODE`. URL that was source of changes came is in `$HG_URL`. | 473 the local repository. The ID of the newly arrived changeset is in |
460 outgoing;; | 474 `$HG_NODE`. URL that was source of changes came is in `$HG_URL`. |
461 Run after sending changes from local repository to another. ID of | 475 outgoing;; |
462 first changeset sent is in `$HG_NODE`. Source of operation is in | 476 Run after sending changes from local repository to another. ID of |
463 `$HG_SOURCE`; see "preoutgoing" hook for description. | 477 first changeset sent is in `$HG_NODE`. Source of operation is in |
464 post-<command>;; | 478 `$HG_SOURCE`; see "preoutgoing" hook for description. |
465 Run after successful invocations of the associated command. The | 479 post-<command>;; |
466 contents of the command line are passed as `$HG_ARGS` and the result | 480 Run after successful invocations of the associated command. The |
467 code in `$HG_RESULT`. Hook failure is ignored. | 481 contents of the command line are passed as `$HG_ARGS` and the result |
468 pre-<command>;; | 482 code in `$HG_RESULT`. Hook failure is ignored. |
469 Run before executing the associated command. The contents of the | 483 pre-<command>;; |
470 command line are passed as `$HG_ARGS`. If the hook returns failure, | 484 Run before executing the associated command. The contents of the |
471 the command doesn't execute and Mercurial returns the failure | 485 command line are passed as `$HG_ARGS`. If the hook returns failure, |
472 code. | 486 the command doesn't execute and Mercurial returns the failure |
473 prechangegroup;; | 487 code. |
474 Run before a changegroup is added via push, pull or unbundle. Exit | 488 prechangegroup;; |
475 status 0 allows the changegroup to proceed. Non-zero status will | 489 Run before a changegroup is added via push, pull or unbundle. Exit |
476 cause the push, pull or unbundle to fail. URL from which changes | 490 status 0 allows the changegroup to proceed. Non-zero status will |
477 will come is in `$HG_URL`. | 491 cause the push, pull or unbundle to fail. URL from which changes |
478 precommit;; | 492 will come is in `$HG_URL`. |
479 Run before starting a local commit. Exit status 0 allows the | 493 precommit;; |
480 commit to proceed. Non-zero status will cause the commit to fail. | 494 Run before starting a local commit. Exit status 0 allows the |
481 Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | 495 commit to proceed. Non-zero status will cause the commit to fail. |
482 preoutgoing;; | 496 Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
483 Run before collecting changes to send from the local repository to | 497 preoutgoing;; |
484 another. Non-zero status will cause failure. This lets you prevent | 498 Run before collecting changes to send from the local repository to |
485 pull over http or ssh. Also prevents against local pull, push | 499 another. Non-zero status will cause failure. This lets you prevent |
486 (outbound) or bundle commands, but not effective, since you can | 500 pull over http or ssh. Also prevents against local pull, push |
487 just copy files instead then. Source of operation is in | 501 (outbound) or bundle commands, but not effective, since you can |
488 `$HG_SOURCE`. If "serve", operation is happening on behalf of remote | 502 just copy files instead then. Source of operation is in |
489 ssh or http repository. If "push", "pull" or "bundle", operation | 503 `$HG_SOURCE`. If "serve", operation is happening on behalf of remote |
490 is happening on behalf of repository on same system. | 504 ssh or http repository. If "push", "pull" or "bundle", operation |
491 pretag;; | 505 is happening on behalf of repository on same system. |
492 Run before creating a tag. Exit status 0 allows the tag to be | 506 pretag;; |
493 created. Non-zero status will cause the tag to fail. ID of | 507 Run before creating a tag. Exit status 0 allows the tag to be |
494 changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is | 508 created. Non-zero status will cause the tag to fail. ID of |
495 local if `$HG_LOCAL=1`, in repo if `$HG_LOCAL=0`. | 509 changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is |
496 pretxnchangegroup;; | 510 local if `$HG_LOCAL=1`, in repo if `$HG_LOCAL=0`. |
497 Run after a changegroup has been added via push, pull or unbundle, | 511 pretxnchangegroup;; |
498 but before the transaction has been committed. Changegroup is | 512 Run after a changegroup has been added via push, pull or unbundle, |
499 visible to hook program. This lets you validate incoming changes | 513 but before the transaction has been committed. Changegroup is |
500 before accepting them. Passed the ID of the first new changeset in | 514 visible to hook program. This lets you validate incoming changes |
501 `$HG_NODE`. Exit status 0 allows the transaction to commit. Non-zero | 515 before accepting them. Passed the ID of the first new changeset in |
502 status will cause the transaction to be rolled back and the push, | 516 `$HG_NODE`. Exit status 0 allows the transaction to commit. Non-zero |
503 pull or unbundle will fail. URL that was source of changes is in | 517 status will cause the transaction to be rolled back and the push, |
504 `$HG_URL`. | 518 pull or unbundle will fail. URL that was source of changes is in |
505 pretxncommit;; | 519 `$HG_URL`. |
506 Run after a changeset has been created but the transaction not yet | 520 pretxncommit;; |
507 committed. Changeset is visible to hook program. This lets you | 521 Run after a changeset has been created but the transaction not yet |
508 validate commit message and changes. Exit status 0 allows the | 522 committed. Changeset is visible to hook program. This lets you |
509 commit to proceed. Non-zero status will cause the transaction to | 523 validate commit message and changes. Exit status 0 allows the |
510 be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset | 524 commit to proceed. Non-zero status will cause the transaction to |
511 IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | 525 be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset |
512 preupdate;; | 526 IDs are in `$HG_PARENT1` and `$HG_PARENT2`. |
513 Run before updating the working directory. Exit status 0 allows | 527 preupdate;; |
514 the update to proceed. Non-zero status will prevent the update. | 528 Run before updating the working directory. Exit status 0 allows |
515 Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID | 529 the update to proceed. Non-zero status will prevent the update. |
516 of second new parent is in `$HG_PARENT2`. | 530 Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID |
517 tag;; | 531 of second new parent is in `$HG_PARENT2`. |
518 Run after a tag is created. ID of tagged changeset is in `$HG_NODE`. | 532 tag;; |
519 Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in repo if | 533 Run after a tag is created. ID of tagged changeset is in `$HG_NODE`. |
520 `$HG_LOCAL=0`. | 534 Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in repo if |
521 update;; | 535 `$HG_LOCAL=0`. |
522 Run after updating the working directory. Changeset ID of first | 536 update;; |
523 new parent is in `$HG_PARENT1`. If merge, ID of second new parent is | 537 Run after updating the working directory. Changeset ID of first |
524 in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the | 538 new parent is in `$HG_PARENT1`. If merge, ID of second new parent is |
525 update failed (e.g. because conflicts not resolved), `$HG_ERROR=1`. | 539 in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the |
526 | 540 update failed (e.g. because conflicts not resolved), `$HG_ERROR=1`. |
527 Note: it is generally better to use standard hooks rather than the | 541 |
528 generic pre- and post- command hooks as they are guaranteed to be | 542 Note: it is generally better to use standard hooks rather than the |
529 called in the appropriate contexts for influencing transactions. | 543 generic pre- and post- command hooks as they are guaranteed to be |
530 Also, hooks like "commit" will be called in all contexts that | 544 called in the appropriate contexts for influencing transactions. |
531 generate a commit (e.g. tag) and not just the commit command. | 545 Also, hooks like "commit" will be called in all contexts that |
532 | 546 generate a commit (e.g. tag) and not just the commit command. |
533 Note2: Environment variables with empty values may not be passed to | 547 |
534 hooks on platforms such as Windows. As an example, `$HG_PARENT2` will | 548 Note2: Environment variables with empty values may not be passed to |
535 have an empty value under Unix-like platforms for non-merge | 549 hooks on platforms such as Windows. As an example, `$HG_PARENT2` will |
536 changesets, while it will not be available at all under Windows. | 550 have an empty value under Unix-like platforms for non-merge |
537 | 551 changesets, while it will not be available at all under Windows. |
538 The syntax for Python hooks is as follows: | 552 |
539 | 553 The syntax for Python hooks is as follows: |
540 hookname = python:modulename.submodule.callable | 554 |
541 hookname = python:/path/to/python/module.py:callable | 555 hookname = python:modulename.submodule.callable |
542 | 556 hookname = python:/path/to/python/module.py:callable |
543 Python hooks are run within the Mercurial process. Each hook is | 557 |
544 called with at least three keyword arguments: a ui object (keyword | 558 Python hooks are run within the Mercurial process. Each hook is |
545 "ui"), a repository object (keyword "repo"), and a "hooktype" | 559 called with at least three keyword arguments: a ui object (keyword |
546 keyword that tells what kind of hook is used. Arguments listed as | 560 "ui"), a repository object (keyword "repo"), and a "hooktype" |
547 environment variables above are passed as keyword arguments, with no | 561 keyword that tells what kind of hook is used. Arguments listed as |
548 "HG_" prefix, and names in lower case. | 562 environment variables above are passed as keyword arguments, with no |
549 | 563 "HG_" prefix, and names in lower case. |
550 If a Python hook returns a "true" value or raises an exception, this | 564 |
551 is treated as a failure. | 565 If a Python hook returns a "true" value or raises an exception, this |
566 is treated as a failure. | |
567 -- | |
552 | 568 |
553 [[http_proxy]] | 569 [[http_proxy]] |
554 http_proxy:: | 570 http_proxy:: |
555 Used to access web-based Mercurial repositories through a HTTP | 571 Used to access web-based Mercurial repositories through a HTTP |
556 proxy. | 572 proxy. |
642 For security reasons, Mercurial will not use the settings in the | 658 For security reasons, Mercurial will not use the settings in the |
643 `.hg/hgrc` file from a repository if it doesn't belong to a trusted | 659 `.hg/hgrc` file from a repository if it doesn't belong to a trusted |
644 user or to a trusted group. The main exception is the web interface, | 660 user or to a trusted group. The main exception is the web interface, |
645 which automatically uses some safe settings, since it's common to | 661 which automatically uses some safe settings, since it's common to |
646 serve repositories from different users. | 662 serve repositories from different users. |
647 | 663 + |
648 This section specifies what users and groups are trusted. The | 664 -- |
649 current user is always trusted. To trust everybody, list a user or a | 665 This section specifies what users and groups are trusted. The |
650 group with name "*". | 666 current user is always trusted. To trust everybody, list a user or a |
651 | 667 group with name "*". |
652 users;; | 668 |
653 Comma-separated list of trusted users. | 669 users;; |
654 groups;; | 670 Comma-separated list of trusted users. |
655 Comma-separated list of trusted groups. | 671 groups;; |
672 Comma-separated list of trusted groups. | |
673 -- | |
656 | 674 |
657 [[ui]] | 675 [[ui]] |
658 ui:: | 676 ui:: |
659 User interface controls. | 677 User interface controls. |
678 + | |
679 -- | |
660 archivemeta;; | 680 archivemeta;; |
661 Whether to include the .hg_archival.txt file containing metadata | 681 Whether to include the .hg_archival.txt file containing metadata |
662 (hashes for the repository base and for tip) in archives created | 682 (hashes for the repository base and for tip) in archives created |
663 by the hg archive command or downloaded via hgweb. | 683 by the hg archive command or downloaded via hgweb. |
664 Default is true. | 684 Default is true. |
687 logtemplate;; | 707 logtemplate;; |
688 Template string for commands that print changesets. | 708 Template string for commands that print changesets. |
689 merge;; | 709 merge;; |
690 The conflict resolution program to use during a manual merge. | 710 The conflict resolution program to use during a manual merge. |
691 There are some internal tools available: | 711 There are some internal tools available: |
692 | 712 + |
693 internal:local;; | 713 internal:local;; |
694 keep the local version | 714 keep the local version |
695 internal:other;; | 715 internal:other;; |
696 use the other version | 716 use the other version |
697 internal:merge;; | 717 internal:merge;; |
698 use the internal non-interactive merge tool | 718 use the internal non-interactive merge tool |
699 internal:fail;; | 719 internal:fail;; |
700 fail to merge | 720 fail to merge |
701 | 721 + |
702 For more information on configuring merge tools see the | 722 For more information on configuring merge tools see the |
703 merge-tools section. | 723 merge-tools section. |
704 | 724 |
705 patch;; | 725 patch;; |
706 command to use to apply patches. Look for 'gpatch' or 'patch' in | 726 command to use to apply patches. Look for 'gpatch' or 'patch' in |
707 PATH if unset. | 727 PATH if unset. |
708 quiet;; | 728 quiet;; |
735 the username in hgrc is empty, it has to be specified manually or | 755 the username in hgrc is empty, it has to be specified manually or |
736 in a different hgrc file (e.g. `$HOME/.hgrc`, if the admin set | 756 in a different hgrc file (e.g. `$HOME/.hgrc`, if the admin set |
737 "username =" in the system hgrc). | 757 "username =" in the system hgrc). |
738 verbose;; | 758 verbose;; |
739 Increase the amount of output printed. True or False. Default is False. | 759 Increase the amount of output printed. True or False. Default is False. |
740 | 760 -- |
741 | 761 |
742 [[web]] | 762 [[web]] |
743 web:: | 763 web:: |
744 Web interface configuration. | 764 Web interface configuration. |
745 accesslog;; | 765 accesslog;; |