stream-clone: explicitly split debug test output for application per version
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 23 May 2023 03:09:46 +0200
changeset 50707 36478b2ab8b3
parent 50706 0452af304808
child 50708 999b710d48d2
stream-clone: explicitly split debug test output for application per version Altering the format may introduce significant changes in output and in order. It is going to be simpler to deal with explicitly different blocks for the output.
tests/test-stream-bundle-v2.t
--- a/tests/test-stream-bundle-v2.t	Thu Jun 01 17:39:22 2023 +0100
+++ b/tests/test-stream-bundle-v2.t	Tue May 23 03:09:46 2023 +0200
@@ -87,17 +87,17 @@
   $ cat http.pid >> $DAEMON_PIDS
 
   $ cd ..
+
+#if stream-v2
   $ hg clone http://localhost:$HGPORT stream-clone-implicit --debug
   using http://localhost:$HGPORT/
   sending capabilities command
   sending clonebundles_manifest command
   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
   bundle2-input-bundle: with-transaction
-  bundle2-input-part: "stream2" (params: 3 mandatory) supported (stream-v2 !)
-  bundle2-input-part: "stream3-exp" (params: 1 mandatory) supported (stream-v3 !)
+  bundle2-input-part: "stream2" (params: 3 mandatory) supported
   applying stream bundle
-  11 files to transfer, 1.65 KB of data (stream-v2 !)
-  11 entries to transfer (stream-v3 !)
+  11 files to transfer, 1.65 KB of data
   starting 4 threads for background file closing (?)
   starting 4 threads for background file closing (?)
   adding [s] data/A.i (66 bytes)
@@ -112,8 +112,7 @@
   adding [c] rbc-names-v1 (7 bytes)
   adding [c] rbc-revs-v1 (40 bytes)
   transferred 1.65 KB in * seconds (* */sec) (glob)
-  bundle2-input-part: total payload size 1840 (stream-v2 !)
-  bundle2-input-part: total payload size 1852 (stream-v3 !)
+  bundle2-input-part: total payload size 1840
   bundle2-input-bundle: 1 parts total
   updating the branch cache
   finished applying clone bundle
@@ -153,11 +152,9 @@
   sending clonebundles_manifest command
   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
   bundle2-input-bundle: with-transaction
-  bundle2-input-part: "stream2" (params: 3 mandatory) supported (stream-v2 !)
-  bundle2-input-part: "stream3-exp" (params: 1 mandatory) supported (stream-v3 !)
+  bundle2-input-part: "stream2" (params: 3 mandatory) supported
   applying stream bundle
-  11 files to transfer, 1.65 KB of data (stream-v2 !)
-  11 entries to transfer (stream-v3 !)
+  11 files to transfer, 1.65 KB of data
   starting 4 threads for background file closing (?)
   starting 4 threads for background file closing (?)
   adding [s] data/A.i (66 bytes)
@@ -172,8 +169,7 @@
   adding [c] rbc-names-v1 (7 bytes)
   adding [c] rbc-revs-v1 (40 bytes)
   transferred 1.65 KB in * seconds (* */sec) (glob)
-  bundle2-input-part: total payload size 1840 (stream-v2 !)
-  bundle2-input-part: total payload size 1852 (stream-v3 !)
+  bundle2-input-part: total payload size 1840
   bundle2-input-bundle: 1 parts total
   updating the branch cache
   finished applying clone bundle
@@ -206,3 +202,122 @@
   5 files updated, 0 files merged, 0 files removed, 0 files unresolved
   updating the branch cache
   (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
+
+#endif
+
+#if stream-v3
+  $ hg clone http://localhost:$HGPORT stream-clone-implicit --debug
+  using http://localhost:$HGPORT/
+  sending capabilities command
+  sending clonebundles_manifest command
+  applying clone bundle from http://localhost:$HGPORT1/bundle.hg
+  bundle2-input-bundle: with-transaction
+  bundle2-input-part: "stream3-exp" (params: 1 mandatory) supported
+  applying stream bundle
+  11 entries to transfer
+  starting 4 threads for background file closing (?)
+  starting 4 threads for background file closing (?)
+  adding [s] data/A.i (66 bytes)
+  adding [s] data/B.i (66 bytes)
+  adding [s] data/C.i (66 bytes)
+  adding [s] data/D.i (66 bytes)
+  adding [s] data/E.i (66 bytes)
+  adding [s] phaseroots (43 bytes)
+  adding [s] 00manifest.i (584 bytes)
+  adding [s] 00changelog.i (595 bytes)
+  adding [c] branch2-served (94 bytes)
+  adding [c] rbc-names-v1 (7 bytes)
+  adding [c] rbc-revs-v1 (40 bytes)
+  transferred 1.65 KB in * seconds (* */sec) (glob)
+  bundle2-input-part: total payload size 1852
+  bundle2-input-bundle: 1 parts total
+  updating the branch cache
+  finished applying clone bundle
+  query 1; heads
+  sending batch command
+  searching for changes
+  all remote heads known locally
+  no changes found
+  sending getbundle command
+  bundle2-input-bundle: with-transaction
+  bundle2-input-part: "listkeys" (params: 1 mandatory) supported
+  bundle2-input-part: "phase-heads" supported
+  bundle2-input-part: total payload size 24
+  bundle2-input-bundle: 2 parts total
+  checking for updated bookmarks
+  updating to branch default
+  resolving manifests
+   branchmerge: False, force: False, partial: False
+   ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041
+   A: remote created -> g
+  getting A
+   B: remote created -> g
+  getting B
+   C: remote created -> g
+  getting C
+   D: remote created -> g
+  getting D
+   E: remote created -> g
+  getting E
+  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updating the branch cache
+  (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
+
+  $ hg clone --stream http://localhost:$HGPORT stream-clone-explicit --debug
+  using http://localhost:$HGPORT/
+  sending capabilities command
+  sending clonebundles_manifest command
+  applying clone bundle from http://localhost:$HGPORT1/bundle.hg
+  bundle2-input-bundle: with-transaction
+  bundle2-input-part: "stream3-exp" (params: 1 mandatory) supported
+  applying stream bundle
+  11 entries to transfer
+  starting 4 threads for background file closing (?)
+  starting 4 threads for background file closing (?)
+  adding [s] data/A.i (66 bytes)
+  adding [s] data/B.i (66 bytes)
+  adding [s] data/C.i (66 bytes)
+  adding [s] data/D.i (66 bytes)
+  adding [s] data/E.i (66 bytes)
+  adding [s] phaseroots (43 bytes)
+  adding [s] 00manifest.i (584 bytes)
+  adding [s] 00changelog.i (595 bytes)
+  adding [c] branch2-served (94 bytes)
+  adding [c] rbc-names-v1 (7 bytes)
+  adding [c] rbc-revs-v1 (40 bytes)
+  transferred 1.65 KB in * seconds (* */sec) (glob)
+  bundle2-input-part: total payload size 1852
+  bundle2-input-bundle: 1 parts total
+  updating the branch cache
+  finished applying clone bundle
+  query 1; heads
+  sending batch command
+  searching for changes
+  all remote heads known locally
+  no changes found
+  sending getbundle command
+  bundle2-input-bundle: with-transaction
+  bundle2-input-part: "listkeys" (params: 1 mandatory) supported
+  bundle2-input-part: "phase-heads" supported
+  bundle2-input-part: total payload size 24
+  bundle2-input-bundle: 2 parts total
+  checking for updated bookmarks
+  updating to branch default
+  resolving manifests
+   branchmerge: False, force: False, partial: False
+   ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041
+   A: remote created -> g
+  getting A
+   B: remote created -> g
+  getting B
+   C: remote created -> g
+  getting C
+   D: remote created -> g
+  getting D
+   E: remote created -> g
+  getting E
+  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updating the branch cache
+  (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
+
+#endif