Mercurial > hg
diff tests/test-hook.t @ 24792:7d0421de8de3
hooks: add a 'txnabort' hook
This hook will be called whenever a transaction is aborted. This will make it
easy for people to clean up temporary content they may have created during a
transaction.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 16 Apr 2015 05:36:49 -0400 |
parents | d283517b260b |
children | 57f1dbc99631 |
line wrap: on
line diff
--- a/tests/test-hook.t Thu Apr 16 05:41:07 2015 -0400 +++ b/tests/test-hook.t Thu Apr 16 05:36:49 2015 -0400 @@ -15,6 +15,7 @@ > pretxnopen = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" pretxnopen" > pretxnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" pretxnclose" > txnclose = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnclose" + > txnabort = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" txnabort" > EOF $ echo a > a $ hg add a @@ -161,6 +162,7 @@ 5:6f611f8018c1 pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a transaction abort! + txnabort hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) rollback completed abort: pretxncommit.forbid1 hook exited with status 1 [255]