diff 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
line wrap: on
line diff
--- a/tests/test-hook.t	Fri Mar 08 00:00:44 2019 +0100
+++ b/tests/test-hook.t	Sat Feb 09 23:01:30 2019 +0100
@@ -252,6 +252,8 @@
   HG_HOOKTYPE=prechangegroup
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   adding changesets
@@ -265,6 +267,8 @@
   HG_NODE_LAST=07f3376c1e655977439df2a814e3cc14b27abac2
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   incoming hook: HG_HOOKNAME=incoming
@@ -272,6 +276,8 @@
   HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   incoming hook: HG_HOOKNAME=incoming
@@ -279,6 +285,8 @@
   HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   incoming hook: HG_HOOKNAME=incoming
@@ -286,6 +294,8 @@
   HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   (run 'hg update' to get a working copy)
@@ -543,6 +553,7 @@
   HG_PUSHKEYCOMPAT=1
   HG_SOURCE=push
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=push
   HG_URL=file:$TESTTMP/a
   
   txnclose hook: HG_BOOKMARK_MOVED=1
@@ -629,6 +640,7 @@
   HG_PUSHKEYCOMPAT=1
   HG_SOURCE=push
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=push
   HG_URL=file:$TESTTMP/a
   
   abort: prepushkey hook exited with status 1
@@ -687,6 +699,8 @@
   HG_HOOKTYPE=prechangegroup
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   abort: prechangegroup.forbid hook exited with status 1
@@ -715,6 +729,8 @@
   HG_PENDING=$TESTTMP/b
   HG_SOURCE=pull
   HG_TXNID=TXN:$ID$
+  HG_TXNNAME=pull
+  file:/*/$TESTTMP/a (glob)
   HG_URL=file:$TESTTMP/a
   
   transaction abort!