Patchwork [1,of,4] test-bundle2: test that we got appropriate hook called with appropriate data

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 13, 2014, 10:19 p.m.
Message ID <f90e9c7a98d10dc9a19b.1413238775@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/6241/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 13, 2014, 10:19 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1413236856 25200
#      Mon Oct 13 14:47:36 2014 -0700
# Node ID f90e9c7a98d10dc9a19b1ae84bdc7825d31db8ec
# Parent  d9093c94f3b96a22d026d0e376a85289e2f5ee47
test-bundle2: test that we got appropriate hook called with appropriate data

We can notice that this transaction wide hooks is only happening during push and
it is missing changegroup related information. We'll want to fix this but this
is not what this patch is about.

Patch

diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -23,10 +23,12 @@  enable obsolescence
   > [web]
   > push_ssl = false
   > allow_push = *
   > [phases]
   > publish=False
+  > [hooks]
+  > b2x-transactionclose = sh -c  "HG_LOCAL= HG_NODE= HG_TAG= python \"$TESTDIR/printenv.py\" b2x-transactionclose"
   > EOF
 
 The extension requires a repo (currently unused)
 
   $ hg init main
@@ -150,10 +152,11 @@  add extra data to test their exchange du
 
 push
   $ hg -R main push other --rev eea13746799a --bookmark book_eea1
   pushing to other
   searching for changes
+  b2x-transactionclose hook: HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_SOURCE=push HG_URL=push
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 0 changes to 0 files (-1 heads)
   remote: 1 new obsolescence markers
@@ -222,10 +225,11 @@  push over ssh
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files
   remote: 1 new obsolescence markers
   updating bookmark book_5fdd
+  remote: b2x-transactionclose hook: HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
   $ hg -R other log -G
   o  6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
   |
   o  5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
   |