[PATCH 2 of 2 STABLE] documentation: clarify the pre-txnclose-phase documentation
Boris Feld
boris.feld at octobus.net
Fri Oct 27 20:10:50 UTC 2017
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1509133402 -7200
# Fri Oct 27 21:43:22 2017 +0200
# Branch stable
# Node ID 01658863a86455823622832fe8e4b5a5f667893e
# Parent c996a94b37293dccb87bd0d8ba2fad68ac413f90
# EXP-Topic doc-phases
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 01658863a864
documentation: clarify the pre-txnclose-phase documentation
Gregory Szorc requested some clarification.
diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -1006,12 +1006,14 @@ be ``$HG_HOOKTYPE=incoming`` and ``$HG_H
Run right before a phase change 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. A non-zero
- status will cause the transaction to be rolled back.
+ status will cause the transaction to be rolled back. The hook is called
+ multiple time, once for each revision affected by a phase change.
The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE``
while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE``
will be empty. In addition, the reason for the transaction opening will be in
``$HG_TXNNAME``, and a unique identifier for the transaction will be in
- ``HG_TXNID``.
+ ``HG_TXNID``. The hook is also run for newly added revisions. In this case
+ the ``$HG_OLDPHASE`` entry will be empty.
``txnclose``
Run after any repository transaction has been committed. At this
More information about the Mercurial-devel
mailing list