##// END OF EJS Templates
dirstate-v2: freeze the on-disk format...
dirstate-v2: freeze the on-disk format It seems the format as reached a good balance. With a core of new capabilities that motivated it initially and enough new feature and room for future improvement to be a clear progress we can set a milestone for. Having the format frozen will help the feature to get real life testing, outside of the test suite. The feature itself stay experimental but the config gains a new name to avoid people enable non-frozen version by default. If too many bugs are reported during the RC we might move the format back to experimental and drop its support in future version (in favor of a new one) Differential Revision: https://phab.mercurial-scm.org/D11709

File last commit:

r49116:bf11ff22 default
r49116:bf11ff22 default
Show More
test-stream-bundle-v2.t
183 lines | 6.7 KiB | text/troff | Tads3Lexer
/ tests / test-stream-bundle-v2.t
Gregory Szorc
tests: disable tests for advanced clone features with simple store...
r37367 #require no-reposimplestore
Boris Feld
streambundlev2: add a new test-file...
r37183 Test creating a consuming stream bundle v2
$ getmainid() {
> hg -R main log --template '{node}\n' --rev "$1"
> }
$ cp $HGRCPATH $TESTTMP/hgrc.orig
$ cat >> $HGRCPATH << EOF
> [experimental]
> evolution.createmarkers=True
> evolution.exchange=True
> bundle2-output-capture=True
> [ui]
> logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
> [web]
> push_ssl = false
> allow_push = *
> [phases]
> publish=False
> [extensions]
> drawdag=$TESTDIR/drawdag.py
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186 > clonebundles=
Boris Feld
streambundlev2: add a new test-file...
r37183 > EOF
The extension requires a repo (currently unused)
$ hg init main
$ cd main
$ hg debugdrawdag <<'EOF'
> E
> |
> D
> |
> C
> |
> B
> |
> A
> EOF
$ hg bundle -a --type="none-v2;stream=v2" bundle.hg
$ hg debugbundle bundle.hg
Stream params: {}
revlog-compression: use zstd by default (if available)...
r47636 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (no-zstd !)
persistent-nodemap: enable the feature by default when using Rust...
r47646 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (zstd no-rust !)
Simon Sapin
dirstate-v2: Update the expected output of some tests for new requirement...
r48054 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (rust no-dirstate-v2 !)
dirstate-v2: freeze the on-disk format...
r49116 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !)
Boris Feld
streambundlev2: add a new test-file...
r37183 $ hg debugbundle --spec bundle.hg
revlog-compression: use zstd by default (if available)...
r47636 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore (no-zstd !)
persistent-nodemap: enable the feature by default when using Rust...
r47646 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (zstd no-rust !)
Simon Sapin
dirstate-v2: Update the expected output of some tests for new requirement...
r48054 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (rust no-dirstate-v2 !)
dirstate-v2: freeze the on-disk format...
r49116 none-v2;stream=v2;requirements%3Ddotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !)
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186
Test that we can apply the bundle as a stream clone bundle
$ cat > .hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg`
> EOF
$ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
$ cat hg.pid >> $DAEMON_PIDS
$ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
$ cat http.pid >> $DAEMON_PIDS
$ cd ..
$ hg clone http://localhost:$HGPORT streamv2-clone-implicit --debug
using http://localhost:$HGPORT/
sending capabilities command
sending clonebundles command
applying clone bundle from http://localhost:$HGPORT1/bundle.hg
bundle2-input-bundle: with-transaction
bundle2-input-part: "stream2" (params: 3 mandatory) supported
applying stream bundle
11 files to transfer, 1.65 KB of data
Matt Harbison
tests: conditionalize test-stream-bundle-v2 for Windows
r37228 starting 4 threads for background file closing (?)
starting 4 threads for background file closing (?)
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186 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] 00manifest.i (584 bytes)
adding [s] 00changelog.i (595 bytes)
adding [s] phaseroots (43 bytes)
adding [c] branch2-served (94 bytes)
adding [c] rbc-names-v1 (7 bytes)
adding [c] rbc-revs-v1 (40 bytes)
clone: automatically glob stream clone output in test...
r48682 transferred 1.65 KB in * seconds (* */sec) (glob)
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186 bundle2-input-part: total payload size 1840
Martin von Zweigbergk
bundle2: fix an off-by-one in debug message of number of parts...
r43201 bundle2-input-bundle: 1 parts total
Yuya Nishihara
transaction: remember original len(repo) instead of tracking added revs (API)...
r39337 updating the branch cache
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186 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
Martin von Zweigbergk
bundle2: fix an off-by-one in debug message of number of parts...
r43201 bundle2-input-bundle: 2 parts total
Boris Feld
streamclonebundle: add a test for stream clone bundle v2...
r37186 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
clone: make sure we warm the cache after a clone...
r47032 updating the branch cache
Gregory Szorc
httppeer: report http statistics...
r40070 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
Boris Feld
streamclonebundle: make sure we accept new stream clone bundle spec...
r37187
$ hg clone --stream http://localhost:$HGPORT streamv2-clone-explicit --debug
using http://localhost:$HGPORT/
sending capabilities command
sending clonebundles command
applying clone bundle from http://localhost:$HGPORT1/bundle.hg
bundle2-input-bundle: with-transaction
bundle2-input-part: "stream2" (params: 3 mandatory) supported
applying stream bundle
11 files to transfer, 1.65 KB of data
Matt Harbison
tests: conditionalize test-stream-bundle-v2 for Windows
r37228 starting 4 threads for background file closing (?)
starting 4 threads for background file closing (?)
Boris Feld
streamclonebundle: make sure we accept new stream clone bundle spec...
r37187 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] 00manifest.i (584 bytes)
adding [s] 00changelog.i (595 bytes)
adding [s] phaseroots (43 bytes)
adding [c] branch2-served (94 bytes)
adding [c] rbc-names-v1 (7 bytes)
adding [c] rbc-revs-v1 (40 bytes)
clone: automatically glob stream clone output in test...
r48682 transferred 1.65 KB in * seconds (* */sec) (glob)
Boris Feld
streamclonebundle: make sure we accept new stream clone bundle spec...
r37187 bundle2-input-part: total payload size 1840
Martin von Zweigbergk
bundle2: fix an off-by-one in debug message of number of parts...
r43201 bundle2-input-bundle: 1 parts total
Yuya Nishihara
transaction: remember original len(repo) instead of tracking added revs (API)...
r39337 updating the branch cache
Boris Feld
streamclonebundle: make sure we accept new stream clone bundle spec...
r37187 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
Martin von Zweigbergk
bundle2: fix an off-by-one in debug message of number of parts...
r43201 bundle2-input-bundle: 2 parts total
Boris Feld
streamclonebundle: make sure we accept new stream clone bundle spec...
r37187 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
clone: make sure we warm the cache after a clone...
r47032 updating the branch cache
Gregory Szorc
httppeer: report http statistics...
r40070 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)