2006-07-14 22:17:22 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-03-27 06:50:01 +04:00
|
|
|
cp "$TESTDIR"/printenv.py .
|
|
|
|
|
2006-07-16 03:06:35 +04:00
|
|
|
hg init test
|
2006-07-14 22:17:22 +04:00
|
|
|
cd test
|
|
|
|
echo foo>foo
|
2009-04-26 16:29:02 +04:00
|
|
|
hg commit -A -m 1
|
2007-10-05 23:17:01 +04:00
|
|
|
hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=../hg1.pid
|
|
|
|
hg serve -p $HGPORT1 -d --pid-file=../hg2.pid
|
2007-02-19 12:08:59 +03:00
|
|
|
# Test server address cannot be reused
|
2008-03-15 01:51:58 +03:00
|
|
|
hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':20060':/"
|
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
|
2007-10-05 23:17:01 +04:00
|
|
|
http_proxy= hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | \
|
2006-08-21 21:46:58 +04:00
|
|
|
sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(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
|
2007-10-05 23:17:01 +04:00
|
|
|
http_proxy= hg clone --uncompressed http://localhost:$HGPORT1/ copy2
|
2006-07-14 22:17:22 +04:00
|
|
|
|
|
|
|
echo % clone via pull
|
2007-10-05 23:17:01 +04:00
|
|
|
http_proxy= hg clone http://localhost:$HGPORT1/ 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
|
2007-03-27 06:50:01 +04:00
|
|
|
echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
|
2007-10-05 23:17:01 +04:00
|
|
|
hg pull | sed -e 's,:[0-9][0-9]*/,/,'
|
2006-07-26 10:42:20 +04:00
|
|
|
cd ..
|