2006-07-14 22:17:22 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-07-16 03:06:35 +04:00
|
|
|
hg init test
|
2006-07-14 22:17:22 +04:00
|
|
|
cd test
|
|
|
|
echo foo>foo
|
2006-07-16 03:06:35 +04:00
|
|
|
hg commit -A -d '0 0' -m 1
|
2006-07-26 10:42:20 +04:00
|
|
|
hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
|
|
|
|
hg serve -p 20060 -d --pid-file=../hg2.pid
|
2006-07-14 22:17:22 +04:00
|
|
|
cd ..
|
2006-07-26 10:42:20 +04:00
|
|
|
cat hg1.pid hg2.pid >> $DAEMON_PIDS
|
2006-07-14 22:17:22 +04:00
|
|
|
|
|
|
|
echo % clone via stream
|
2006-07-16 03:06:35 +04:00
|
|
|
http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \
|
2006-08-22 03:33:43 +04:00
|
|
|
sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/.\(B\/sec\)/X\1/'
|
2006-07-26 10:42:20 +04:00
|
|
|
hg verify -R copy
|
2006-07-14 22:17:22 +04:00
|
|
|
|
2006-07-16 03:06:35 +04:00
|
|
|
echo % try to clone via stream, should use pull instead
|
|
|
|
http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
|
2006-07-14 22:17:22 +04:00
|
|
|
|
|
|
|
echo % clone via pull
|
2006-07-15 01:51:36 +04:00
|
|
|
http_proxy= hg clone http://localhost:20059/ copy-pull
|
2006-07-26 10:42:20 +04:00
|
|
|
hg verify -R copy-pull
|
2006-07-26 00:50:32 +04:00
|
|
|
|
|
|
|
cd test
|
|
|
|
echo bar > bar
|
|
|
|
hg commit -A -d '1 0' -m 2
|
2006-07-26 10:42:20 +04:00
|
|
|
cd ..
|
2006-07-26 00:50:32 +04:00
|
|
|
|
|
|
|
echo % pull
|
2006-07-26 10:42:20 +04:00
|
|
|
cd copy-pull
|
2006-07-26 00:50:32 +04:00
|
|
|
echo '[hooks]' >> .hg/hgrc
|
|
|
|
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
|
|
|
|
hg pull
|
2006-07-26 10:42:20 +04:00
|
|
|
cd ..
|