-
Pierre-Yves David authored
Touching `test-clone-stream.t` is very painful otherwise. Differential Revision: https://phab.mercurial-scm.org/D11337
Pierre-Yves David authoredTouching `test-clone-stream.t` is very painful otherwise. Differential Revision: https://phab.mercurial-scm.org/D11337
test-http-bundle1.t 15.48 KiB
#require serve
This test is a duplicate of 'test-http.t', feel free to factor out
parts that are not bundle1/bundle2 specific.
$ cat << EOF >> $HGRCPATH
> [devel]
> # This test is dedicated to interaction through old bundle
> legacy.exchange = bundle1
> EOF
$ hg init test
$ cd test
$ echo foo>foo
$ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
$ echo foo>foo.d/foo
$ echo bar>foo.d/bAr.hg.d/BaR
$ echo bar>foo.d/baR.d.hg/bAR
$ hg commit -A -m 1
adding foo
adding foo.d/bAr.hg.d/BaR
adding foo.d/baR.d.hg/bAR
adding foo.d/foo
$ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
$ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
Test server address cannot be reused
$ hg serve -p $HGPORT1 2>&1
abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
[255]
$ cd ..
$ cat hg1.pid hg2.pid >> $DAEMON_PIDS
clone via stream
#if no-reposimplestore
$ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
streaming all changes
6 files to transfer, 606 bytes of data (no-zstd !)
6 files to transfer, 608 bytes of data (zstd !)
transferred * bytes in * seconds (*/sec) (glob)
searching for changes
no changes found
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg verify -R copy
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
checked 1 changesets with 4 changes to 4 files
#endif
try to clone via stream, should use pull instead
$ hg clone --stream http://localhost:$HGPORT1/ copy2
warning: stream clone requested but server has them disabled
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
new changesets 8b6053c928fe
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
try to clone via stream but missing requirements, so should use pull instead