Mercurial > hg
changeset 25370:faed8e52b81f
tests: use bundle2 for test-hook
Using bundle2 has an effect on which hooks are run when. We turn it on for
test-hooks early to reduce the noise of switching the default exchange to
bundle2.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 27 May 2015 04:56:44 -0700 |
parents | 02defdb1b628 |
children | fbcbdc62f248 |
files | tests/test-hook.t |
diffstat | 1 files changed, 20 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hook.t Wed May 27 04:57:03 2015 -0700 +++ b/tests/test-hook.t Wed May 27 04:56:44 2015 -0700 @@ -1,6 +1,13 @@ commit hooks can see env vars (and post-transaction one are run unlocked) + $ cat << EOF >> $HGRCPATH + > [experimental] + > # drop me once bundle2 is the default, + > # added to get test change early. + > bundle2-exp = True + > EOF + $ cat > $TESTTMP/txnabort.checkargs.py <<EOF > def showargs(ui, repo, hooktype, **kwargs): > ui.write('%s python hook: %s\n' % (hooktype, ','.join(sorted(kwargs)))) @@ -228,10 +235,10 @@ pushing to ../a searching for changes no changes found - pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmarks (glob) - pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmarks (glob) - txnclose hook: HG_BOOKMARK_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=bookmarks (glob) + pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) + pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 + txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) exporting bookmark foo [1] $ cd ../a @@ -244,10 +251,11 @@ $ hg pull -B bar ../a pulling from ../a listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} + no changes found + listkeys hook: HG_NAMESPACE=phase HG_VALUES={} listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} - no changes found + adding remote bookmark bar listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} - adding remote bookmark bar $ cd ../a test that prepushkey can prevent incoming keys @@ -261,10 +269,13 @@ listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} no changes found + pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) + prepushkey.forbid hook: HG_BUNDLE2=1 HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:* HG_URL=push (glob) + pushkey-abort: prepushkey hook exited with status 1 + pretxnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) + txnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) + exporting bookmark baz failed! listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} - prepushkey.forbid hook: HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 - pushkey-abort: prepushkey hook exited with status 1 - exporting bookmark baz failed! [1] $ cd ../a @@ -333,8 +344,8 @@ pulling from ../a searching for changes preoutgoing hook: HG_SOURCE=pull + outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull adding changesets - outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull adding manifests adding file changes added 1 changesets with 1 changes to 1 files