comparison mercurial/help/config.txt @ 24791:89c5881d692c

help: document the ''HG_TXNID'' environment variable during hooks We forgot to document the new "transaction ID" mechanism.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 16 Apr 2015 05:41:07 -0400
parents 7d01371e6358
children 7d0421de8de3
comparison
equal deleted inserted replaced
24790:baa11dde8c0e 24791:89c5881d692c
808 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is 808 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
809 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. 809 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
810 810
811 ``pretxnopen`` 811 ``pretxnopen``
812 Run before any new repository transaction is open. The reason for the 812 Run before any new repository transaction is open. The reason for the
813 transaction will be in ``$HG_TXNNAME``. A non-zero status will 813 transaction will be in ``$HG_TXNNAME`` and a unique identifier for the
814 prevent the transaction from being opened. 814 transaction will be in ``HG_TXNID``. A non-zero status will prevent the
815 transaction from being opened.
815 816
816 ``pretxnclose`` 817 ``pretxnclose``
817 Run right before the transaction is actually finalized. Any 818 Run right before the transaction is actually finalized. Any
818 repository change will be visible to the hook program. This lets you 819 repository change will be visible to the hook program. This lets you
819 validate the transaction content or change it. Exit status 0 allows 820 validate the transaction content or change it. Exit status 0 allows
820 the commit to proceed. Non-zero status will cause the transaction to 821 the commit to proceed. Non-zero status will cause the transaction to
821 be rolled back. The reason for the transaction opening will be in 822 be rolled back. The reason for the transaction opening will be in
822 ``$HG_TXNNAME``. The rest of the available data will vary according 823 ``$HG_TXNNAME`` and a unique identifier for the transaction will be in
823 the transaction type. New changesets will add 824 ``HG_TXNID``. The rest of the available data will vary according the
824 ``$HG_NODE`` (id of the first added changeset), ``$HG_URL`` and 825 transaction type. New changesets will add ``$HG_NODE`` (id of the
825 ``$HG_SOURCE`` variables, bookmarks and phases changes will set 826 first added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables,
826 ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc. 827 bookmarks and phases changes will set ``HG_BOOKMARK_MOVED`` and
828 ``HG_PHASES_MOVED`` to ``1``, etc.
827 829
828 ``txnclose`` 830 ``txnclose``
829 Run after any repository transaction has been commited. At this 831 Run after any repository transaction has been commited. At this
830 point, the transaction can no longer be rolled back. The hook will run 832 point, the transaction can no longer be rolled back. The hook will run
831 after the lock is released. see ``pretxnclose`` docs for details about 833 after the lock is released. see ``pretxnclose`` docs for details about