Mercurial > hg
comparison doc/hgrc.5.txt @ 8727:1b713f72c91a
hgrc.5: language fixes
author | timeless <timeless@gmail.com> |
---|---|
date | Sun, 07 Jun 2009 17:34:12 +0200 |
parents | 72b95e3a0cc9 |
children | 01f0ddb90342 |
comparison
equal
deleted
inserted
replaced
8726:72b95e3a0cc9 | 8727:1b713f72c91a |
---|---|
318 by the path to the ".py" file (including the file name extension) | 318 by the path to the ".py" file (including the file name extension) |
319 that defines the extension. | 319 that defines the extension. |
320 | 320 |
321 To explicitly disable an extension that is enabled in an hgrc of | 321 To explicitly disable an extension that is enabled in an hgrc of |
322 broader scope, prepend its path with '!', as in | 322 broader scope, prepend its path with '!', as in |
323 'hgext.foo = !/ext/path' or 'hgext.foo = !' when no path is | 323 'hgext.foo = !/ext/path' or 'hgext.foo = !' when path is not |
324 supplied. | 324 supplied. |
325 | 325 |
326 Example for ~/.hgrc: | 326 Example for ~/.hgrc: |
327 | 327 |
328 [extensions] | 328 [extensions] |
443 # do not use the site-wide hook | 443 # do not use the site-wide hook |
444 incoming = | 444 incoming = |
445 incoming.email = /my/email/hook | 445 incoming.email = /my/email/hook |
446 incoming.autobuild = /my/build/hook | 446 incoming.autobuild = /my/build/hook |
447 | 447 |
448 Most hooks are run with environment variables set that give added | 448 Most hooks are run with environment variables set that give useful |
449 useful information. For each hook below, the environment | 449 additional information. For each hook below, the environment |
450 variables it is passed are listed with names of the form | 450 variables it is passed are listed with names of the form "$HG_foo". |
451 "$HG_foo". | |
452 | 451 |
453 changegroup;; | 452 changegroup;; |
454 Run after a changegroup has been added via push, pull or | 453 Run after a changegroup has been added via push, pull or |
455 unbundle. ID of the first new changeset is in $HG_NODE. URL from | 454 unbundle. ID of the first new changeset is in $HG_NODE. URL from |
456 which changes came is in $HG_URL. | 455 which changes came is in $HG_URL. |
523 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if | 522 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if |
524 $HG_LOCAL=1, in repo if $HG_LOCAL=0. | 523 $HG_LOCAL=1, in repo if $HG_LOCAL=0. |
525 update;; | 524 update;; |
526 Run after updating the working directory. Changeset ID of first | 525 Run after updating the working directory. Changeset ID of first |
527 new parent is in $HG_PARENT1. If merge, ID of second new parent | 526 new parent is in $HG_PARENT1. If merge, ID of second new parent |
528 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update | 527 is in $HG_PARENT2. If the update succeeded, $HG_ERROR=0. If the |
529 failed (e.g. because conflicts not resolved), $HG_ERROR=1. | 528 update failed (e.g. because conflicts not resolved), $HG_ERROR=1. |
530 | 529 |
531 Note: it is generally better to use standard hooks rather | 530 Note: it is generally better to use standard hooks rather |
532 than the generic pre- and post- command hooks as they are | 531 than the generic pre- and post- command hooks as they are |
533 guaranteed to be called in the appropriate contexts for | 532 guaranteed to be called in the appropriate contexts for |
534 influencing transactions. Also, hooks like "commit" will be | 533 influencing transactions. Also, hooks like "commit" will be |
535 called in all contexts that generate a commit (eg. tag) and | 534 called in all contexts that generate a commit (e.g. tag) and |
536 not just the commit command. | 535 not just the commit command. |
537 | 536 |
538 Note2: Environment variables with empty values may not be | 537 Note2: Environment variables with empty values may not be |
539 passed to hooks on platforms like Windows. For instance, | 538 passed to hooks on platforms such as Windows. As an |
540 $HG_PARENT2 will not be available under Windows for non-merge | 539 example, $HG_PARENT2 will have an empty value under |
541 changesets while being set to an empty value under Unix-like | 540 Unix-like platforms for non-merge changesets, while it |
542 systems. | 541 will not be available at all under Windows. |
543 | 542 |
544 The syntax for Python hooks is as follows: | 543 The syntax for Python hooks is as follows: |
545 | 544 |
546 hookname = python:modulename.submodule.callable | 545 hookname = python:modulename.submodule.callable |
547 hookname = python:/path/to/python/module.py:callable | 546 hookname = python:/path/to/python/module.py:callable |
553 Arguments listed as environment variables above are passed as | 552 Arguments listed as environment variables above are passed as |
554 keyword arguments, with no "HG_" prefix, and names in lower | 553 keyword arguments, with no "HG_" prefix, and names in lower |
555 case. | 554 case. |
556 | 555 |
557 If a Python hook returns a "true" value or raises an | 556 If a Python hook returns a "true" value or raises an |
558 exception, this is treated as failure of the hook. | 557 exception, this is treated as a failure. |
559 | 558 |
560 [[http_proxy]] | 559 [[http_proxy]] |
561 http_proxy:: | 560 http_proxy:: |
562 Used to access web-based Mercurial repositories through a HTTP | 561 Used to access web-based Mercurial repositories through a HTTP |
563 proxy. | 562 proxy. |
704 internal:merge;; | 703 internal:merge;; |
705 use the internal non-interactive merge tool | 704 use the internal non-interactive merge tool |
706 internal:fail;; | 705 internal:fail;; |
707 fail to merge | 706 fail to merge |
708 | 707 |
709 See the merge-tools section for more information on | 708 For more information on configuring merge tools see the |
710 configuring tools. | 709 merge-tools section. |
711 | 710 |
712 patch;; | 711 patch;; |
713 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if | 712 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if |
714 unset. | 713 unset. |
715 quiet;; | 714 quiet;; |