Mercurial > hg
comparison tests/test-hook.t @ 41896:94faa2e84094
transaction: include txnname in the hookargs dictionary
There is no reason to not include the txnname alongside the txnid in all case.
The python hooks already have them, so aligning the the shell hooks seems it
could be useful in the future.
(I don't have a strong opinion about this, we can also decide to never align the
python and shell hooks and this and I'll drop this patch).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 09 Feb 2019 23:01:30 +0100 |
parents | d7ce1ea7a5f2 |
children | d7304434390f |
comparison
equal
deleted
inserted
replaced
41895:c1017bceb6ec | 41896:94faa2e84094 |
---|---|
250 searching for changes | 250 searching for changes |
251 prechangegroup hook: HG_HOOKNAME=prechangegroup | 251 prechangegroup hook: HG_HOOKNAME=prechangegroup |
252 HG_HOOKTYPE=prechangegroup | 252 HG_HOOKTYPE=prechangegroup |
253 HG_SOURCE=pull | 253 HG_SOURCE=pull |
254 HG_TXNID=TXN:$ID$ | 254 HG_TXNID=TXN:$ID$ |
255 HG_TXNNAME=pull | |
256 file:/*/$TESTTMP/a (glob) | |
255 HG_URL=file:$TESTTMP/a | 257 HG_URL=file:$TESTTMP/a |
256 | 258 |
257 adding changesets | 259 adding changesets |
258 adding manifests | 260 adding manifests |
259 adding file changes | 261 adding file changes |
263 HG_HOOKTYPE=changegroup | 265 HG_HOOKTYPE=changegroup |
264 HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd | 266 HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd |
265 HG_NODE_LAST=07f3376c1e655977439df2a814e3cc14b27abac2 | 267 HG_NODE_LAST=07f3376c1e655977439df2a814e3cc14b27abac2 |
266 HG_SOURCE=pull | 268 HG_SOURCE=pull |
267 HG_TXNID=TXN:$ID$ | 269 HG_TXNID=TXN:$ID$ |
270 HG_TXNNAME=pull | |
271 file:/*/$TESTTMP/a (glob) | |
268 HG_URL=file:$TESTTMP/a | 272 HG_URL=file:$TESTTMP/a |
269 | 273 |
270 incoming hook: HG_HOOKNAME=incoming | 274 incoming hook: HG_HOOKNAME=incoming |
271 HG_HOOKTYPE=incoming | 275 HG_HOOKTYPE=incoming |
272 HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd | 276 HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd |
273 HG_SOURCE=pull | 277 HG_SOURCE=pull |
274 HG_TXNID=TXN:$ID$ | 278 HG_TXNID=TXN:$ID$ |
279 HG_TXNNAME=pull | |
280 file:/*/$TESTTMP/a (glob) | |
275 HG_URL=file:$TESTTMP/a | 281 HG_URL=file:$TESTTMP/a |
276 | 282 |
277 incoming hook: HG_HOOKNAME=incoming | 283 incoming hook: HG_HOOKNAME=incoming |
278 HG_HOOKTYPE=incoming | 284 HG_HOOKTYPE=incoming |
279 HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 | 285 HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 |
280 HG_SOURCE=pull | 286 HG_SOURCE=pull |
281 HG_TXNID=TXN:$ID$ | 287 HG_TXNID=TXN:$ID$ |
288 HG_TXNNAME=pull | |
289 file:/*/$TESTTMP/a (glob) | |
282 HG_URL=file:$TESTTMP/a | 290 HG_URL=file:$TESTTMP/a |
283 | 291 |
284 incoming hook: HG_HOOKNAME=incoming | 292 incoming hook: HG_HOOKNAME=incoming |
285 HG_HOOKTYPE=incoming | 293 HG_HOOKTYPE=incoming |
286 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 | 294 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 |
287 HG_SOURCE=pull | 295 HG_SOURCE=pull |
288 HG_TXNID=TXN:$ID$ | 296 HG_TXNID=TXN:$ID$ |
297 HG_TXNNAME=pull | |
298 file:/*/$TESTTMP/a (glob) | |
289 HG_URL=file:$TESTTMP/a | 299 HG_URL=file:$TESTTMP/a |
290 | 300 |
291 (run 'hg update' to get a working copy) | 301 (run 'hg update' to get a working copy) |
292 | 302 |
293 tag hooks can see env vars | 303 tag hooks can see env vars |
541 HG_NAMESPACE=bookmarks | 551 HG_NAMESPACE=bookmarks |
542 HG_NEW=0000000000000000000000000000000000000000 | 552 HG_NEW=0000000000000000000000000000000000000000 |
543 HG_PUSHKEYCOMPAT=1 | 553 HG_PUSHKEYCOMPAT=1 |
544 HG_SOURCE=push | 554 HG_SOURCE=push |
545 HG_TXNID=TXN:$ID$ | 555 HG_TXNID=TXN:$ID$ |
556 HG_TXNNAME=push | |
546 HG_URL=file:$TESTTMP/a | 557 HG_URL=file:$TESTTMP/a |
547 | 558 |
548 txnclose hook: HG_BOOKMARK_MOVED=1 | 559 txnclose hook: HG_BOOKMARK_MOVED=1 |
549 HG_BUNDLE2=1 | 560 HG_BUNDLE2=1 |
550 HG_HOOKNAME=txnclose | 561 HG_HOOKNAME=txnclose |
627 HG_NAMESPACE=bookmarks | 638 HG_NAMESPACE=bookmarks |
628 HG_NEW=0000000000000000000000000000000000000000 | 639 HG_NEW=0000000000000000000000000000000000000000 |
629 HG_PUSHKEYCOMPAT=1 | 640 HG_PUSHKEYCOMPAT=1 |
630 HG_SOURCE=push | 641 HG_SOURCE=push |
631 HG_TXNID=TXN:$ID$ | 642 HG_TXNID=TXN:$ID$ |
643 HG_TXNNAME=push | |
632 HG_URL=file:$TESTTMP/a | 644 HG_URL=file:$TESTTMP/a |
633 | 645 |
634 abort: prepushkey hook exited with status 1 | 646 abort: prepushkey hook exited with status 1 |
635 [255] | 647 [255] |
636 $ cd ../a | 648 $ cd ../a |
685 searching for changes | 697 searching for changes |
686 prechangegroup.forbid hook: HG_HOOKNAME=prechangegroup.forbid | 698 prechangegroup.forbid hook: HG_HOOKNAME=prechangegroup.forbid |
687 HG_HOOKTYPE=prechangegroup | 699 HG_HOOKTYPE=prechangegroup |
688 HG_SOURCE=pull | 700 HG_SOURCE=pull |
689 HG_TXNID=TXN:$ID$ | 701 HG_TXNID=TXN:$ID$ |
702 HG_TXNNAME=pull | |
703 file:/*/$TESTTMP/a (glob) | |
690 HG_URL=file:$TESTTMP/a | 704 HG_URL=file:$TESTTMP/a |
691 | 705 |
692 abort: prechangegroup.forbid hook exited with status 1 | 706 abort: prechangegroup.forbid hook exited with status 1 |
693 [255] | 707 [255] |
694 | 708 |
713 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | 727 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
714 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | 728 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
715 HG_PENDING=$TESTTMP/b | 729 HG_PENDING=$TESTTMP/b |
716 HG_SOURCE=pull | 730 HG_SOURCE=pull |
717 HG_TXNID=TXN:$ID$ | 731 HG_TXNID=TXN:$ID$ |
732 HG_TXNNAME=pull | |
733 file:/*/$TESTTMP/a (glob) | |
718 HG_URL=file:$TESTTMP/a | 734 HG_URL=file:$TESTTMP/a |
719 | 735 |
720 transaction abort! | 736 transaction abort! |
721 rollback completed | 737 rollback completed |
722 abort: pretxnchangegroup.forbid1 hook exited with status 1 | 738 abort: pretxnchangegroup.forbid1 hook exited with status 1 |