##// END OF EJS Templates
config: gather the path to edit through rcutil...
config: gather the path to edit through rcutil Using the common logic helps to reduce potential error when it changes

File last commit:

r53256:3f0cf7bb default
r53324:8c509a70 default
Show More
test-clone-stream.t
613 lines | 18.9 KiB | text/troff | Tads3Lexer
/ tests / test-clone-stream.t
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 #require serve no-reposimplestore no-chg
stream-clone: introduce the notion of an experimental "v3" version...
r51417 #testcases stream-legacy stream-bundle2-v2 stream-bundle2-v3
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
#if stream-legacy
$ cat << EOF >> $HGRCPATH
> [server]
> bundle2.stream = no
changelog: never inline changelog...
r52074 > [format]
> # persistent nodemap is too broken with legacy format,
> # however client with nodemap support will have better stream support.
> use-persistent-nodemap=no
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 > EOF
#endif
stream-clone: introduce the notion of an experimental "v3" version...
r51417 #if stream-bundle2-v3
$ cat << EOF >> $HGRCPATH
> [experimental]
> stream-v3 = yes
> EOF
#endif
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Initialize repository
$ hg init server
$ cd server
stream-clone: add a explicit test for format change during stream clone...
r49444 $ sh $TESTDIR/testlib/stream_clone_setup.sh
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 adding 00changelog-ab349180a0405010.nd
adding 00changelog.d
adding 00changelog.i
adding 00changelog.n
adding 00manifest.d
adding 00manifest.i
Raphaël Gomès
branching: merge stable into default
r48692 adding container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 adding data/foo.d
adding data/foo.i
adding data/foo.n
adding data/undo.babar
adding data/undo.d
adding data/undo.foo.d
adding data/undo.foo.i
adding data/undo.foo.n
adding data/undo.i
adding data/undo.n
adding data/undo.py
adding foo.d
adding foo.i
adding foo.n
adding meta/foo.d
adding meta/foo.i
adding meta/foo.n
adding meta/undo.babar
adding meta/undo.d
adding meta/undo.foo.d
adding meta/undo.foo.i
adding meta/undo.foo.n
adding meta/undo.i
adding meta/undo.n
adding meta/undo.py
adding savanah/foo.d
adding savanah/foo.i
adding savanah/foo.n
adding savanah/undo.babar
adding savanah/undo.d
adding savanah/undo.foo.d
adding savanah/undo.foo.i
adding savanah/undo.foo.n
adding savanah/undo.i
adding savanah/undo.n
adding savanah/undo.py
adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc)
adding store/foo.d
adding store/foo.i
adding store/foo.n
adding store/undo.babar
adding store/undo.d
adding store/undo.foo.d
adding store/undo.foo.i
adding store/undo.foo.n
adding store/undo.i
adding store/undo.n
adding store/undo.py
adding undo.babar
adding undo.d
adding undo.foo.d
adding undo.foo.i
adding undo.foo.n
adding undo.i
adding undo.n
adding undo.py
stream-clone: add a explicit test for format change during stream clone...
r49444
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
Check local clone
==================
The logic is close enough of uncompressed.
This is present here to reuse the testing around file with "special" names.
$ hg clone server local-clone
updating to branch default
Raphaël Gomès
branching: merge stable into default
r48692 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
Check that the clone went well
Raphaël Gomès
tests: use the `--quiet` flag for verify when applicable...
r50720 $ hg verify -R local-clone -q
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Check uncompressed
==================
stream-clone-test: simplify the case where server disabled it...
r52365 Cannot stream clone when server.uncompressed is set to false
------------------------------------------------------------
When `server.uncompressed` is disabled, the client should fallback to a bundle
based clone with a warning.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
200 Script output follows
1
$ hg debugcapabilities http://localhost:$HGPORT
Main capabilities:
batch
branchmap
$USUAL_BUNDLE2_CAPS_SERVER$
changegroupsubset
compression=$BUNDLE2_COMPRESSIONS$
getbundle
httpheader=1024
httpmediatype=0.1rx,0.1tx,0.2tx
known
lookup
pushkey
unbundle=HG10GZ,HG10BZ,HG10UN
unbundlehash
Bundle2 capabilities:
HG20
bookmarks
changegroup
01
02
Matt Harbison
configitems: enable changegroup3 by default (unless using infinitepush)...
r51176 03
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 checkheads
related
digests
md5
sha1
sha512
error
abort
unsupportedcontent
pushraced
pushkey
hgtagsfnodes
listkeys
phases
heads
pushkey
remote-changegroup
http
https
$ hg clone --stream -U http://localhost:$HGPORT server-disabled
warning: stream clone requested but server has them disabled
requesting all changes
adding changesets
adding manifests
adding file changes
Raphaël Gomès
branching: merge stable into default
r48692 added 3 changesets with 1088 changes to 1088 files
new changesets 96ee1d7354c4:5223b5e3265f
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ killdaemons.py
$ cd server
$ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
Basic clone
stream-clone-test: factor some piece of basic clone test out...
r52366 -----------
Check that --stream trigger a stream clone and result in a valid repositoty
We check the associated output for exact bytes on file number as changes in
these value implies changes in the data transfered and can detect unintended
changes in the process.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
#if stream-legacy
$ hg clone --stream -U http://localhost:$HGPORT clone1
streaming all changes
changelog: never inline changelog...
r52074 1091 files to transfer, 102 KB of data (no-zstd !)
Raphaël Gomès
branching: merge stable into default
r48692 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
changelog: never inline changelog...
r52074 1091 files to transfer, 98.8 KB of data (zstd !)
Raphaël Gomès
branching: merge stable into default
r48692 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 searching for changes
no changes found
#endif
stream-clone: introduce the notion of an experimental "v3" version...
r51417 #if stream-bundle2-v2
$ hg clone --stream -U http://localhost:$HGPORT clone1
streaming all changes
changelog: never inline changelog...
r52074 1094 files to transfer, 102 KB of data (no-zstd !)
stream-clone: introduce the notion of an experimental "v3" version...
r51417 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
changelog: never inline changelog...
r52074 1094 files to transfer, 98.9 KB of data (zstd no-rust !)
transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
1096 files to transfer, 99.0 KB of data (zstd rust !)
transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
stream-clone-test: factor some piece of basic clone test out...
r52366 #endif
stream-clone: introduce the notion of an experimental "v3" version...
r51417
stream-clone-test: factor some piece of basic clone test out...
r52366 #if stream-bundle2-v3
$ hg clone --stream -U http://localhost:$HGPORT clone1
streaming all changes
1093 entries to transfer
transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
#endif
#if no-stream-legacy
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ ls -1 clone1/.hg/cache
branch2-base
branch2-served
rev-branch-cache: increment the version to "v2"...
r52799 rbc-names-v2
rbc-revs-v2
stream-clone: introduce the notion of an experimental "v3" version...
r51417 tags2
tags2-served
#endif
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
stream-clone-test: factor some piece of basic clone test out...
r52366 $ hg -R clone1 verify --quiet
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ cat server/errors.txt
getbundle requests with stream=1 are uncompressed
stream-clone-test: simplify the test for getbundle with stream=1...
r52367 -------------------------------------------------
We check that `getbundle` will return a stream bundle when requested.
XXX manually building the --requestheader is fragile and will drift away from actual usage
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Arseniy Alekseyev
stream-clone: check the version of streaming clone supported by the client...
r51412 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 200 Script output follows
content-type: application/mercurial-0.2
stream-clone-test: simplify the test for getbundle with stream=1...
r52367 $ f --size --hex --bytes 48 body
body: size=* (glob)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
stream-clone-test: simplify the test for getbundle with stream=1...
r52367 0010: ?? 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |?.STREAM2.......| (glob)
0020: 06 09 04 0c ?? 62 79 74 65 63 6f 75 6e 74 31 30 |....?bytecount10| (glob)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
--uncompressed is an alias to --stream
stream-clone-test: simplify the --uncompressed alias check...
r52369 ---------------------------------------
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
stream-clone-test: simplify the --uncompressed alias check...
r52369 The alias flag should trigger a stream clone too.
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
streaming all changes
stream-clone-test: simplify the --uncompressed alias check...
r52369 * files to transfer* (glob) (no-stream-bundle2-v3 !)
* entries to transfer (glob) (stream-bundle2-v3 !)
transferred * KB in * seconds (* */sec) (glob)
searching for changes (stream-legacy !)
no changes found (stream-legacy !)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Clone with background file closing enabled
stream-clone-test: simplify the background file closing test...
r52370 -------------------------------------------
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
stream-clone-test: simplify the background file closing test...
r52370 The backgound file closing logic should trigger when configured to do so, and
the result should be a valid repository.
$ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep "background file closing"
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 starting 4 threads for background file closing
stream-clone-test: simplify the background file closing test...
r52370 starting 4 threads for background file closing (no-stream-legacy !)
$ hg verify -R clone-background --quiet
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Cannot stream clone when there are secret changesets
stream-clone-test: simplify testing of secret cloning restriction...
r52371 ----------------------------------------------------
If secret changeset are present the should not be cloned (by default) and the
clone falls back to a bundle clone.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ hg -R server phase --force --secret -r tip
$ hg clone --stream -U http://localhost:$HGPORT secret-denied
warning: stream clone requested but server has them disabled
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1025 changes to 1025 files
new changesets 96ee1d7354c4:c17445101a72
$ killdaemons.py
Streaming of secrets can be overridden by server config
stream-clone-test: simplify testing of secret cloning restriction...
r52371 -------------------------------------------------------
Secret changeset can still be streamed if the server is configured to do so.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ cd server
$ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
streaming all changes
stream-clone-test: simplify testing of secret cloning restriction...
r52371 * files to transfer* (glob) (no-stream-bundle2-v3 !)
* entries to transfer (glob) (stream-bundle2-v3 !)
transferred * KB in * seconds (* */sec) (glob)
searching for changes (stream-legacy !)
no changes found (stream-legacy !)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ killdaemons.py
Verify interaction between preferuncompressed and secret presence
stream-clone-test: add title to various test cases...
r52372 -----------------------------------------------------------------
Secret presence will still make the clone falls back to a normal bundle even if
the server prefers stream clone.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ cd server
$ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
$ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1025 changes to 1025 files
new changesets 96ee1d7354c4:c17445101a72
$ killdaemons.py
Clone not allowed when full bundles disabled and can't serve secrets
stream-clone-test: add title to various test cases...
r52372 --------------------------------------------------------------------
The clone should fail as no valid option is found.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ cd server
$ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
$ hg clone --stream http://localhost:$HGPORT secret-full-disabled
warning: stream clone requested but server has them disabled
requesting all changes
remote: abort: server has pull-based clones disabled
abort: pull failed on remote
(remove --pull if specified or upgrade Mercurial)
[100]
Local stream clone with secrets involved
stream-clone-test: add title to various test cases...
r52372 ----------------------------------------
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 (This is just a test over behavior: if you have access to the repo's files,
there is no security so it isn't important to prevent a clone here.)
$ hg clone -U --stream server local-secret
warning: stream clone requested but server has them disabled
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1025 changes to 1025 files
new changesets 96ee1d7354c4:c17445101a72
stream-clone-test: simplify testing of secret cloning restriction...
r52371 (revert introduction of secret changeset)
$ hg -R server phase --draft 'secret()'
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 Stream clone while repo is changing:
stream-clone-test: add a verify call to the "clone while changing" case...
r52373 ------------------------------------
We should send a repository in a valid state, ignoring the ongoing transaction.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ mkdir changing
$ cd changing
prepare repo with small and big file to cover both code paths in emitrevlogdata
stream-clone-test: add a verify call to the "clone while changing" case...
r52373 (inlined revlog and non-inlined revlogs).
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ hg init repo
$ touch repo/f1
$ $TESTDIR/seq.py 50000 > repo/f2
$ hg -R repo ci -Aqm "0"
stream: preserve volatile cache early...
r53256 $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1"
$ export HG_TEST_STREAM_WALKED_FILE_1
$ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2"
$ export HG_TEST_STREAM_WALKED_FILE_2
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3"
$ export HG_TEST_STREAM_WALKED_FILE_3
stream: rename all test hook point one number up...
r53255 $ HG_TEST_STREAM_WALKED_FILE_4="$TESTTMP/sync_file_walked_4"
$ export HG_TEST_STREAM_WALKED_FILE_4
$ HG_TEST_STREAM_WALKED_FILE_5="$TESTTMP/sync_file_walked_5"
$ export HG_TEST_STREAM_WALKED_FILE_5
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 # $ cat << EOF >> $HGRCPATH
# > [hooks]
# > pre-clone=rm -f "$TESTTMP/sync_file_walked_*"
# > EOF
$ hg serve -R repo -p $HGPORT1 -d --error errors.log --pid-file=hg.pid --config extensions.stream_steps="$RUNTESTDIR/testlib/ext-stream-clone-steps.py"
$ cat hg.pid >> $DAEMON_PIDS
clone while modifying the repo between stating file with write lock and
actually serving file content
stream: preserve volatile cache early...
r53256 also delete some cache in the process
stream: rename all test hook point one number up...
r53255 $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_5") &
stream: preserve volatile cache early...
r53256
$ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
(delete one file)
$ ls repo/.hg/cache/rbc-revs-v2
repo/.hg/cache/rbc-revs-v2
$ rm repo/.hg/cache/rbc-revs-v2
(truncate another)
$ ls repo/.hg/cache/rbc-names-v2
repo/.hg/cache/rbc-names-v2
$ echo football > repo/.hg/cache/rbc-names-v2
(lenghten another one)
$ ls repo/.hg/cache/branch2-served
repo/.hg/cache/branch2-served
$ echo bar >> repo/.hg/cache/branch2-served
(remove one in wcache))
$ ls repo/.hg/wcache/manifestfulltextcache
repo/.hg/wcache/manifestfulltextcache
$ rm repo/.hg/wcache/manifestfulltextcache
$ touch $HG_TEST_STREAM_WALKED_FILE_2
stream: rename all test hook point one number up...
r53255 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ echo >> repo/f1
$ echo >> repo/f2
$ hg -R repo ci -m "1" --config ui.timeout.warn=-1
stream: preserve volatile cache early...
r53256 (truncate further)
$ ls repo/.hg/cache/rbc-names-v2
repo/.hg/cache/rbc-names-v2
$ echo foo > repo/.hg/cache/rbc-names-v2
(lenghten another one)
$ ls repo/.hg/cache/branch2-served
repo/.hg/cache/branch2-served
$ echo babar >> repo/.hg/cache/branch2-served
stream: rename all test hook point one number up...
r53255 $ touch $HG_TEST_STREAM_WALKED_FILE_4
$ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_5
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ hg -R clone id
000000000000
stream-clone-test: add a verify call to the "clone while changing" case...
r52373 $ hg -R clone verify --quiet
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ cat errors.log
$ cd ..
Stream repository with bookmarks
--------------------------------
stream-clone-test: simplify bookmark clone...
r52374 The bookmark file should be send over in the stream bundle.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 add a bookmark
$ hg -R server bookmark -r tip some-bookmark
clone it
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
streaming all changes
stream-clone-test: simplify bookmark clone...
r52374 1091 files to transfer, * KB of data (glob) (stream-legacy !)
1097 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !)
1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !)
1096 entries to transfer (stream-bundle2-v3 !)
transferred * KB in * seconds (* */sec) (glob)
searching for changes (stream-legacy !)
no changes found (stream-legacy !)
stream-clone: introduce the notion of an experimental "v3" version...
r51417 updating to branch default
1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
Raphaël Gomès
tests: use the `--quiet` flag for verify when applicable...
r50720 $ hg verify -R with-bookmarks -q
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ hg -R with-bookmarks bookmarks
Raphaël Gomès
branching: merge stable into default
r48692 some-bookmark 2:5223b5e3265f
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
Stream repository with phases
-----------------------------
stream-clone-test: simplify the case testing phases...
r52375 The file storing phases information (e.g. phaseroots) should be sent as part of
the stream bundle.
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 Clone as publishing
$ hg -R server phase -r 'all()'
0: draft
1: draft
2: draft
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg clone --stream http://localhost:$HGPORT phase-publish
streaming all changes
stream-clone-test: simplify the case testing phases...
r52375 1091 files to transfer, * KB of data (glob) (stream-legacy !)
1097 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !)
1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !)
1096 entries to transfer (stream-bundle2-v3 !)
transferred * KB in * seconds (* */sec) (glob)
searching for changes (stream-legacy !)
no changes found (stream-legacy !)
stream-clone: introduce the notion of an experimental "v3" version...
r51417 updating to branch default
1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
Raphaël Gomès
tests: use the `--quiet` flag for verify when applicable...
r50720 $ hg verify -R phase-publish -q
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ hg -R phase-publish phase -r 'all()'
0: public
1: public
2: public
Clone as non publishing
$ cat << EOF >> server/.hg/hgrc
> [phases]
> publish = False
> EOF
$ killdaemons.py
$ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
streaming all changes
stream-clone-test: simplify the case testing phases...
r52375 1091 files to transfer, * KB of data (glob) (stream-legacy !)
1098 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !)
1100 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !)
1097 entries to transfer (stream-bundle2-v3 !)
transferred * KB in * seconds (* */sec) (glob)
searching for changes (stream-legacy !)
no changes found (stream-legacy !)
stream-clone: introduce the notion of an experimental "v3" version...
r51417 updating to branch default
1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
stream-clone-test: simplify the case testing phases...
r52375
Note: With v1 of the stream protocol, changeset are always cloned as public. It
make stream v1 unsuitable for non-publishing repository.
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ hg -R phase-no-publish phase -r 'all()'
stream-clone-test: simplify the case testing phases...
r52375 0: public (stream-legacy !)
1: public (stream-legacy !)
2: public (stream-legacy !)
0: draft (no-stream-legacy !)
1: draft (no-stream-legacy !)
2: draft (no-stream-legacy !)
Raphaël Gomès
tests: use the `--quiet` flag for verify when applicable...
r50720 $ hg verify -R phase-no-publish -q
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ killdaemons.py
stream-clone-test: simplify case testing obsolescence...
r52376
Stream repository with obsolescence
-----------------------------------
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 #if stream-legacy
With v1 of the stream protocol, changeset are always cloned as public. There's
no obsolescence markers exchange in stream v1.
stream-clone-test: simplify case testing obsolescence...
r52376 #else
stream-clone: introduce the notion of an experimental "v3" version...
r51417
Clone non-publishing with obsolescence
stream-clone-test: simplify case testing obsolescence...
r52376 The obsstore file should be send as part of the stream bundle
stream-clone: introduce the notion of an experimental "v3" version...
r51417 $ cat >> $HGRCPATH << EOF
> [experimental]
> evolution=all
> EOF
$ cd server
$ echo foo > foo
$ hg -q commit -m 'about to be pruned'
$ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
1 new obsolescence markers
obsoleted 1 changesets
$ hg up null -q
$ hg log -T '{rev}: {phase}\n'
2: draft
1: draft
0: draft
$ hg serve -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid > $DAEMON_PIDS
$ cd ..
$ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
streaming all changes
stream-clone-test: simplify case testing obsolescence...
r52376 1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !)
1101 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !)
1098 entries to transfer (no-stream-bundle2-v2 !)
transferred * KB in * seconds (* */sec) (glob)
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
2: draft
1: draft
0: draft
$ hg debugobsolete -R with-obsolescence
Raphaël Gomès
branching: merge stable into default
r48692 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Raphaël Gomès
tests: use the `--quiet` flag for verify when applicable...
r50720 $ hg verify -R with-obsolescence -q
Valentin Gatien-Baron
tests: rename test-clone-uncompressed.t...
r48690
$ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
streaming all changes
remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
abort: pull failed on remote
[100]
$ killdaemons.py
#endif
Valentin Gatien-Baron
streamclone: avoid some obscure error in a corner case...
r49847
Cloning a repo with no requirements doesn't give some obscure error
stream-clone-test: add title to various test cases...
r52372 -------------------------------------------------------------------
Valentin Gatien-Baron
streamclone: avoid some obscure error in a corner case...
r49847
$ mkdir -p empty-repo/.hg
$ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2
$ hg --cwd empty-repo2 verify -q
Arseniy Alekseyev
stream-clone: fix a crash when a repo with an empty revlog is cloned
r51970
Cloning a repo with an empty manifestlog doesn't give some weird error
stream-clone-test: add title to various test cases...
r52372 ----------------------------------------------------------------------
Arseniy Alekseyev
stream-clone: fix a crash when a repo with an empty revlog is cloned
r51970
$ rm -r empty-repo; hg init empty-repo
$ (cd empty-repo; touch x; hg commit -Am empty; hg debugstrip -r 0) > /dev/null
$ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo3
stream-clone-tests: stop filtering non existent warning...
r52377 $ hg --cwd empty-repo3 verify -q