[PATCH 1 of 2] help: document the ''HG_TXNID'' environment variable during hooks
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Apr 16 09:44:02 UTC 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1429177267 14400
# Thu Apr 16 05:41:07 2015 -0400
# Node ID bc4d8bc84a827ce2674f4f9cb650f5da60aca86e
# Parent d5711c886d0b1acb2d18b92bf6e8ba6d9ad0c4b3
help: document the ''HG_TXNID'' environment variable during hooks
We forgot to document the new "transaction ID" mechanism.
diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -808,24 +808,26 @@ variables it is passed are listed with n
changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
``pretxnopen``
Run before any new repository transaction is open. The reason for the
- transaction will be in ``$HG_TXNNAME``. A non-zero status will
- prevent the transaction from being opened.
+ transaction will be in ``$HG_TXNNAME`` and a unique identifier for the
+ transaction will be in ``HG_TXNID``. A non-zero status will prevent the
+ transaction from being opened.
``pretxnclose``
Run right before the transaction is actually finalized. Any
repository change will be visible to the hook program. This lets you
validate the transaction content or change it. Exit status 0 allows
the commit to proceed. Non-zero status will cause the transaction to
be rolled back. The reason for the transaction opening will be in
- ``$HG_TXNNAME``. The rest of the available data will vary according
- the transaction type. New changesets will add
- ``$HG_NODE`` (id of the first added changeset), ``$HG_URL`` and
- ``$HG_SOURCE`` variables, bookmarks and phases changes will set
- ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc.
+ ``$HG_TXNNAME`` and a unique identifier for the transaction will be in
+ ``HG_TXNID``. The rest of the available data will vary according the
+ transaction type. New changesets will add ``$HG_NODE`` (id of the
+ first added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables,
+ bookmarks and phases changes will set ``HG_BOOKMARK_MOVED`` and
+ ``HG_PHASES_MOVED`` to ``1``, etc.
``txnclose``
Run after any repository transaction has been commited. At this
point, the transaction can no longer be rolled back. The hook will run
after the lock is released. see ``pretxnclose`` docs for details about
More information about the Mercurial-devel
mailing list