test-http-bundle1.t
413 lines
| 16.3 KiB
| text/troff
|
Tads3Lexer
/ tests / test-http-bundle1.t
Pierre-Yves David
|
r25377 | #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 | ||||
Pierre-Yves David
|
r29686 | > [devel] | ||
Pierre-Yves David
|
r25377 | > # This test is dedicated to interaction through old bundle | ||
Pierre-Yves David
|
r29686 | > legacy.exchange = bundle1 | ||
Pierre-Yves David
|
r25377 | > 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 | ||||
Jun Wu
|
r28549 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | ||
Pierre-Yves David
|
r25377 | |||
Test server address cannot be reused | ||||
$ hg serve -p $HGPORT1 2>&1 | ||||
Matt Harbison
|
r35233 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ | ||
Pierre-Yves David
|
r25377 | [255] | ||
Matt Harbison
|
r35233 | |||
Pierre-Yves David
|
r25377 | $ cd .. | ||
$ cat hg1.pid hg2.pid >> $DAEMON_PIDS | ||||
clone via stream | ||||
Gregory Szorc
|
r37367 | #if no-reposimplestore | ||
Gregory Szorc
|
r34394 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 | ||
Pierre-Yves David
|
r25377 | streaming all changes | ||
6 files to transfer, 606 bytes of data | ||||
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 | ||||
4 files, 1 changesets, 4 total revisions | ||||
Gregory Szorc
|
r37367 | #endif | ||
Pierre-Yves David
|
r25377 | |||
try to clone via stream, should use pull instead | ||||
Gregory Szorc
|
r34394 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 | ||
Siddharth Agarwal
|
r32259 | warning: stream clone requested but server has them disabled | ||
Pierre-Yves David
|
r25377 | requesting all changes | ||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 4 changes to 4 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
Siddharth Agarwal
|
r32258 | try to clone via stream but missing requirements, so should use pull instead | ||
$ cat > $TESTTMP/removesupportedformat.py << EOF | ||||
> from mercurial import localrepo | ||||
> def extsetup(ui): | ||||
Augie Fackler
|
r36270 | > localrepo.localrepository.supportedformats.remove(b'generaldelta') | ||
Siddharth Agarwal
|
r32258 | > EOF | ||
Gregory Szorc
|
r34394 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | ||
Siddharth Agarwal
|
r32259 | warning: stream clone requested but client is missing requirements: generaldelta | ||
(see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | ||||
Siddharth Agarwal
|
r32258 | requesting all changes | ||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 4 changes to 4 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe | ||
Siddharth Agarwal
|
r32258 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
Pierre-Yves David
|
r25377 | clone via pull | ||
$ hg clone http://localhost:$HGPORT1/ copy-pull | ||||
requesting all changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 4 changes to 4 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg verify -R copy-pull | ||||
checking changesets | ||||
checking manifests | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
4 files, 1 changesets, 4 total revisions | ||||
$ cd test | ||||
$ echo bar > bar | ||||
$ hg commit -A -d '1 0' -m 2 | ||||
adding bar | ||||
$ cd .. | ||||
clone over http with --update | ||||
$ hg clone http://localhost:$HGPORT1/ updated --update 0 | ||||
requesting all changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 2 changesets with 5 changes to 5 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe:5fed3813f7f5 | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg log -r . -R updated | ||||
changeset: 0:8b6053c928fe | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: 1 | ||||
$ rm -rf updated | ||||
incoming via HTTP | ||||
$ hg clone http://localhost:$HGPORT1/ --rev 0 partial | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 4 changes to 4 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd partial | ||||
$ touch LOCAL | ||||
$ hg ci -qAm LOCAL | ||||
$ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | ||||
comparing with http://localhost:$HGPORT1/ | ||||
searching for changes | ||||
2 | ||||
$ cd .. | ||||
pull | ||||
$ cd copy-pull | ||||
FUJIWARA Katsunori
|
r30234 | $ cat >> .hg/hgrc <<EOF | ||
> [hooks] | ||||
> changegroup = sh -c "printenv.py changegroup" | ||||
> EOF | ||||
Pierre-Yves David
|
r25377 | $ hg pull | ||
pulling from http://localhost:$HGPORT1/ | ||||
searching for changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 1 changes to 1 files | ||||
Denis Laxalde
|
r34662 | new changesets 5fed3813f7f5 | ||
Pierre-Yves David
|
r31747 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/ | ||
Pierre-Yves David
|
r25377 | (run 'hg update' to get a working copy) | ||
$ cd .. | ||||
clone from invalid URL | ||||
$ hg clone http://localhost:$HGPORT/bad | ||||
abort: HTTP Error 404: Not Found | ||||
[255] | ||||
test http authentication | ||||
+ use the same server to test server side streaming preference | ||||
$ cd test | ||||
$ cat << EOT > userpass.py | ||||
> import base64 | ||||
> from mercurial.hgweb import common | ||||
> def perform_authentication(hgweb, req, op): | ||||
Gregory Szorc
|
r36893 | > auth = req.headers.get('Authorization') | ||
Pierre-Yves David
|
r25377 | > if not auth: | ||
> raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | ||||
> [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | ||||
Augie Fackler
|
r36270 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | ||
> b'pass']: | ||||
Pierre-Yves David
|
r25377 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | ||
> def extsetup(): | ||||
> common.permhooks.insert(0, perform_authentication) | ||||
> EOT | ||||
Jun Wu
|
r28549 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | ||
Pierre-Yves David
|
r25377 | > --config server.preferuncompressed=True \ | ||
> --config web.push_ssl=False --config web.allow_push=* -A ../access.log | ||||
$ cat pid >> $DAEMON_PIDS | ||||
$ cat << EOF > get_pass.py | ||||
> import getpass | ||||
> def newgetpass(arg): | ||||
> return "pass" | ||||
> getpass.getpass = newgetpass | ||||
> EOF | ||||
$ hg id http://localhost:$HGPORT2/ | ||||
abort: http authorization required for http://localhost:$HGPORT2/ | ||||
[255] | ||||
$ hg id http://localhost:$HGPORT2/ | ||||
abort: http authorization required for http://localhost:$HGPORT2/ | ||||
[255] | ||||
$ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | ||||
http authorization required for http://localhost:$HGPORT2/ | ||||
realm: mercurial | ||||
user: user | ||||
password: 5fed3813f7f5 | ||||
$ hg id http://user:pass@localhost:$HGPORT2/ | ||||
5fed3813f7f5 | ||||
$ echo '[auth]' >> .hg/hgrc | ||||
$ echo 'l.schemes=http' >> .hg/hgrc | ||||
$ echo 'l.prefix=lo' >> .hg/hgrc | ||||
$ echo 'l.username=user' >> .hg/hgrc | ||||
$ echo 'l.password=pass' >> .hg/hgrc | ||||
$ hg id http://localhost:$HGPORT2/ | ||||
5fed3813f7f5 | ||||
$ hg id http://localhost:$HGPORT2/ | ||||
5fed3813f7f5 | ||||
$ hg id http://user@localhost:$HGPORT2/ | ||||
5fed3813f7f5 | ||||
Gregory Szorc
|
r37367 | |||
#if no-reposimplestore | ||||
Pierre-Yves David
|
r25377 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | ||
streaming all changes | ||||
7 files to transfer, 916 bytes of data | ||||
transferred * bytes in * seconds (*/sec) (glob) | ||||
searching for changes | ||||
no changes found | ||||
updating to branch default | ||||
5 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
Gregory Szorc
|
r37367 | #endif | ||
Pierre-Yves David
|
r25377 | --pull should override server's preferuncompressed | ||
Gregory Szorc
|
r37367 | |||
Pierre-Yves David
|
r25377 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | ||
requesting all changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 2 changesets with 5 changes to 5 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe:5fed3813f7f5 | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
5 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg id http://user2@localhost:$HGPORT2/ | ||||
abort: http authorization required for http://localhost:$HGPORT2/ | ||||
[255] | ||||
$ hg id http://user:pass2@localhost:$HGPORT2/ | ||||
abort: HTTP Error 403: no | ||||
[255] | ||||
Gregory Szorc
|
r37367 | $ hg -R dest-pull tag -r tip top | ||
$ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | ||||
Pierre-Yves David
|
r25377 | pushing to http://user:***@localhost:$HGPORT2/ | ||
searching for changes | ||||
remote: adding changesets | ||||
remote: adding manifests | ||||
remote: adding file changes | ||||
remote: added 1 changesets with 1 changes to 1 files | ||||
$ hg rollback -q | ||||
Augie Fackler
|
r29564 | $ sed 's/.*] "/"/' < ../access.log | ||
Joerg Sonnenberger
|
r37516 | "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | ||||
"GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 403 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull | ||||
"GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
"GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||||
timeless
|
r28996 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob) | ||
Joerg Sonnenberger
|
r37516 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | ||
Pierre-Yves David
|
r25377 | |||
$ cd .. | ||||
clone of serve with repo in root and unserved subrepo (issue2970) | ||||
$ hg --cwd test init sub | ||||
$ echo empty > test/sub/empty | ||||
$ hg --cwd test/sub add empty | ||||
$ hg --cwd test/sub commit -qm 'add empty' | ||||
$ hg --cwd test/sub tag -r 0 something | ||||
$ echo sub = sub > test/.hgsub | ||||
$ hg --cwd test add .hgsub | ||||
$ hg --cwd test commit -qm 'add subrepo' | ||||
$ hg clone http://localhost:$HGPORT noslash-clone | ||||
requesting all changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 3 changesets with 7 changes to 7 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe:56f9bc90cce6 | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
abort: HTTP Error 404: Not Found | ||||
[255] | ||||
$ hg clone http://localhost:$HGPORT/ slash-clone | ||||
requesting all changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 3 changesets with 7 changes to 7 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe:56f9bc90cce6 | ||
Pierre-Yves David
|
r25377 | updating to branch default | ||
abort: HTTP Error 404: Not Found | ||||
[255] | ||||
check error log | ||||
$ cat error.log | ||||
Pierre-Yves David
|
r30914 | |||
Check error reporting while pulling/cloning | ||||
$ $RUNTESTDIR/killdaemons.py | ||||
Saurabh Singh
|
r34484 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py | ||
Pierre-Yves David
|
r30914 | $ cat hg3.pid >> $DAEMON_PIDS | ||
$ hg clone http://localhost:$HGPORT/ abort-clone | ||||
requesting all changes | ||||
abort: remote error: | ||||
this is an exercise | ||||
[255] | ||||
$ cat error.log | ||||
Siddharth Agarwal
|
r32260 | |||
disable pull-based clones | ||||
Saurabh Singh
|
r34484 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | ||
Siddharth Agarwal
|
r32260 | $ cat hg4.pid >> $DAEMON_PIDS | ||
$ hg clone http://localhost:$HGPORT1/ disable-pull-clone | ||||
requesting all changes | ||||
abort: remote error: | ||||
server has pull-based clones disabled | ||||
[255] | ||||
Gregory Szorc
|
r37448 | #if no-reposimplestore | ||
Siddharth Agarwal
|
r32260 | ... but keep stream clones working | ||
Gregory Szorc
|
r34394 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone | ||
Siddharth Agarwal
|
r32260 | streaming all changes | ||
* files to transfer, * of data (glob) | ||||
transferred * in * seconds (* KB/sec) (glob) | ||||
searching for changes | ||||
no changes found | ||||
Gregory Szorc
|
r37448 | #endif | ||
Siddharth Agarwal
|
r32260 | |||
... and also keep partial clones and pulls working | ||||
$ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 1 changesets with 4 changes to 4 files | ||||
Denis Laxalde
|
r34662 | new changesets 8b6053c928fe | ||
Siddharth Agarwal
|
r32260 | updating to branch default | ||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg pull -R test-partial-clone | ||||
pulling from http://localhost:$HGPORT1/ | ||||
searching for changes | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 2 changesets with 3 changes to 3 files | ||||
Denis Laxalde
|
r34662 | new changesets 5fed3813f7f5:56f9bc90cce6 | ||
Siddharth Agarwal
|
r32260 | (run 'hg update' to get a working copy) | ||
$ cat error.log | ||||