[PATCH 09 of 15 V2] bookmark: introduce in advance a variant of the exchange test
Boris Feld
boris.feld at octobus.net
Thu Nov 2 09:18:06 EDT 2017
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1508236659 -7200
# Tue Oct 17 12:37:39 2017 +0200
# Node ID e634131ba39fa08d292675ca73a6c0cf8cb2588b
# Parent 1d6e6f7bf4dd82ebb78e5c5934c8ddf370dfec86
# EXP-Topic b2.bookmarks
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r e634131ba39f
bookmark: introduce in advance a variant of the exchange test
We are about to introduce a new way to push bookmark to server. We introduce
the test variant before actually updating the exchange to help the output
changes to stand out when it happens.
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1,3 +1,4 @@
+#testcases b2-pushkey b2-binary
#require serve
$ cat << EOF >> $HGRCPATH
@@ -103,6 +104,9 @@ export bookmark by name
delete a remote bookmark
$ hg book -d W
+
+#if b2-pushkey
+
$ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes
pushing to ../a
query 1; heads
@@ -212,6 +216,120 @@ delete a remote bookmark
listing keys for "phases"
[1]
+#endif
+#if b2-binary
+
+ $ hg push -B W ../a --config "$TESTHOOK" --debug --config devel.bundle2.debug=yes
+ pushing to ../a
+ query 1; heads
+ searching for changes
+ all remote heads known locally
+ listing keys for "phases"
+ checking for updated bookmarks
+ listing keys for "bookmarks"
+ no changes found
+ bundle2-output-bundle: "HG20", 4 parts total
+ bundle2-output: start emission of HG20 stream
+ bundle2-output: bundle parameter:
+ bundle2-output: start of parts
+ bundle2-output: bundle part: "replycaps"
+ bundle2-output-part: "replycaps" 195 bytes payload
+ bundle2-output: part 0: "REPLYCAPS"
+ bundle2-output: header chunk size: 16
+ bundle2-output: payload chunk size: 195
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "check:bookmarks"
+ bundle2-output-part: "check:bookmarks" 23 bytes payload
+ bundle2-output: part 1: "CHECK:BOOKMARKS"
+ bundle2-output: header chunk size: 22
+ bundle2-output: payload chunk size: 23
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "check:phases"
+ bundle2-output-part: "check:phases" 48 bytes payload
+ bundle2-output: part 2: "CHECK:PHASES"
+ bundle2-output: header chunk size: 19
+ bundle2-output: payload chunk size: 48
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "pushkey"
+ bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload
+ bundle2-output: part 3: "PUSHKEY"
+ bundle2-output: header chunk size: 90
+ bundle2-output: closing payload chunk
+ bundle2-output: end of bundle
+ bundle2-input: start processing of HG20 stream
+ bundle2-input: reading bundle2 stream parameters
+ bundle2-input-bundle: with-transaction
+ bundle2-input: start extraction of bundle2 parts
+ bundle2-input: part header size: 16
+ bundle2-input: part type: "REPLYCAPS"
+ bundle2-input: part id: "0"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part replycaps
+ bundle2-input-part: "replycaps" supported
+ bundle2-input: payload chunk size: 195
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 195
+ bundle2-input: part header size: 22
+ bundle2-input: part type: "CHECK:BOOKMARKS"
+ bundle2-input: part id: "1"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part check:bookmarks
+ bundle2-input-part: "check:bookmarks" supported
+ bundle2-input: payload chunk size: 23
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 23
+ bundle2-input: part header size: 19
+ bundle2-input: part type: "CHECK:PHASES"
+ bundle2-input: part id: "2"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part check:phases
+ bundle2-input-part: "check:phases" supported
+ bundle2-input: payload chunk size: 48
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 48
+ bundle2-input: part header size: 90
+ bundle2-input: part type: "PUSHKEY"
+ bundle2-input: part id: "3"
+ bundle2-input: part parameters: 4
+ bundle2-input: found a handler for part pushkey
+ bundle2-input-part: "pushkey" (params: 4 mandatory) supported
+ pushing key for "bookmarks:W"
+ bundle2-input: payload chunk size: 0
+ bundle2-input: part header size: 0
+ bundle2-input: end of bundle2 stream
+ bundle2-input-bundle: 3 parts total
+ running hook txnclose-bookmark.test: sh $TESTTMP/hook.sh
+ test-hook-bookmark: W: 0000000000000000000000000000000000000000 ->
+ bundle2-output-bundle: "HG20", 1 parts total
+ bundle2-output: start emission of HG20 stream
+ bundle2-output: bundle parameter:
+ bundle2-output: start of parts
+ bundle2-output: bundle part: "reply:pushkey"
+ bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
+ bundle2-output: part 0: "REPLY:PUSHKEY"
+ bundle2-output: header chunk size: 43
+ bundle2-output: closing payload chunk
+ bundle2-output: end of bundle
+ bundle2-input: start processing of HG20 stream
+ bundle2-input: reading bundle2 stream parameters
+ bundle2-input-bundle: no-transaction
+ bundle2-input: start extraction of bundle2 parts
+ bundle2-input: part header size: 43
+ bundle2-input: part type: "REPLY:PUSHKEY"
+ bundle2-input: part id: "0"
+ bundle2-input: part parameters: 2
+ bundle2-input: found a handler for part reply:pushkey
+ bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
+ bundle2-input: payload chunk size: 0
+ bundle2-input: part header size: 0
+ bundle2-input: end of bundle2 stream
+ bundle2-input-bundle: 0 parts total
+ deleting remote bookmark W
+ listing keys for "phases"
+ [1]
+
+#endif
+
export the active bookmark
$ hg bookmark V
@@ -953,6 +1071,8 @@ Check hook preventing push (issue4455)
Local push
----------
+#if b2-pushkey
+
$ hg push -B @ local
pushing to $TESTTMP/issue4455-dest (glob)
searching for changes
@@ -960,12 +1080,28 @@ Local push
pushkey-abort: prepushkey hook exited with status 1
abort: exporting bookmark @ failed!
[255]
+
+#endif
+#if b2-binary
+
+ $ hg push -B @ local
+ pushing to $TESTTMP/issue4455-dest (glob)
+ searching for changes
+ no changes found
+ pushkey-abort: prepushkey hook exited with status 1
+ abort: exporting bookmark @ failed!
+ [255]
+
+#endif
+
$ hg -R ../issue4455-dest/ bookmarks
no bookmarks set
Using ssh
---------
+#if b2-pushkey
+
$ hg push -B @ ssh # bundle2+
pushing to ssh://user@dummy/issue4455-dest
searching for changes
@@ -973,6 +1109,7 @@ Using ssh
remote: pushkey-abort: prepushkey hook exited with status 1
abort: exporting bookmark @ failed!
[255]
+
$ hg -R ../issue4455-dest/ bookmarks
no bookmarks set
@@ -983,12 +1120,27 @@ Using ssh
remote: pushkey-abort: prepushkey hook exited with status 1
exporting bookmark @ failed!
[1]
+
+#endif
+#if b2-binary
+
+ $ hg push -B @ ssh # bundle2+
+ pushing to ssh://user@dummy/issue4455-dest
+ searching for changes
+ no changes found
+ remote: pushkey-abort: prepushkey hook exited with status 1
+ abort: exporting bookmark @ failed!
+ [255]
+
+#endif
+
$ hg -R ../issue4455-dest/ bookmarks
no bookmarks set
Using http
----------
+#if b2-pushkey
$ hg push -B @ http # bundle2+
pushing to http://localhost:$HGPORT/
searching for changes
@@ -996,6 +1148,7 @@ Using http
remote: pushkey-abort: prepushkey hook exited with status 1
abort: exporting bookmark @ failed!
[255]
+
$ hg -R ../issue4455-dest/ bookmarks
no bookmarks set
@@ -1006,5 +1159,20 @@ Using http
remote: pushkey-abort: prepushkey hook exited with status 1
exporting bookmark @ failed!
[1]
+
+#endif
+
+#if b2-binary
+
+ $ hg push -B @ ssh # bundle2+
+ pushing to ssh://user@dummy/issue4455-dest
+ searching for changes
+ no changes found
+ remote: pushkey-abort: prepushkey hook exited with status 1
+ abort: exporting bookmark @ failed!
+ [255]
+
+#endif
+
$ hg -R ../issue4455-dest/ bookmarks
no bookmarks set
More information about the Mercurial-devel
mailing list