test-http
36 lines
| 953 B
| text/plain
|
TextLexer
/ tests / test-http
|
r2612 | #!/bin/sh | ||
|
r2621 | hg init test | ||
|
r2612 | cd test | ||
echo foo>foo | ||||
|
r2621 | hg commit -A -d '0 0' -m 1 | ||
|
r2676 | hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid | ||
hg serve -p 20060 -d --pid-file=../hg2.pid | ||||
|
r4130 | # Test server address cannot be reused | ||
hg serve -p 20060 2>&1 | sed -e 's/abort: cannot start server:.*/abort: cannot start server:/' | ||||
|
r2612 | cd .. | ||
|
r2676 | cat hg1.pid hg2.pid >> $DAEMON_PIDS | ||
|
r2612 | |||
echo % clone via stream | ||||
|
r2621 | http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \ | ||
|
r3015 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' | ||
|
r2676 | hg verify -R copy | ||
|
r2612 | |||
|
r2621 | echo % try to clone via stream, should use pull instead | ||
http_proxy= hg clone --uncompressed http://localhost:20060/ copy2 | ||||
|
r2612 | |||
echo % clone via pull | ||||
|
r2613 | http_proxy= hg clone http://localhost:20059/ copy-pull | ||
|
r2676 | hg verify -R copy-pull | ||
|
r2673 | |||
cd test | ||||
echo bar > bar | ||||
hg commit -A -d '1 0' -m 2 | ||||
|
r2676 | cd .. | ||
|
r2673 | |||
echo % pull | ||||
|
r2676 | cd copy-pull | ||
|
r2673 | echo '[hooks]' >> .hg/hgrc | ||
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc | ||||
hg pull | ||||
|
r2676 | cd .. | ||