# HG changeset patch # User Boris Feld # Date 1509133402 -7200 # Node ID 3f8273172636b91a0762b621d18fad60a0bd3aaa # Parent 28baeab476ccddb009b034b77179d912fb0fc373 help: clarify the pre-txnclose-phase documentation Gregory Szorc requested some clarification. diff -r 28baeab476cc -r 3f8273172636 mercurial/help/config.txt --- a/mercurial/help/config.txt Fri Oct 27 21:35:34 2017 +0200 +++ b/mercurial/help/config.txt Fri Oct 27 21:43:22 2017 +0200 @@ -1006,12 +1006,14 @@ 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 times, 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