2006-05-23 02:42:49 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
hg init a
|
|
|
|
cd a
|
|
|
|
echo a > a
|
|
|
|
hg ci -Ama -d '1123456789 0'
|
2006-07-16 21:04:16 +04:00
|
|
|
hg --config server.uncompressed=True serve -p 20059 -d --pid-file=hg.pid
|
2006-07-06 22:45:34 +04:00
|
|
|
cat hg.pid >> $DAEMON_PIDS
|
2006-05-23 02:42:49 +04:00
|
|
|
|
|
|
|
cd ..
|
2006-07-06 22:45:34 +04:00
|
|
|
("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null &
|
2006-05-23 02:42:49 +04:00
|
|
|
echo $! > proxy.pid)
|
2006-07-06 22:45:34 +04:00
|
|
|
cat proxy.pid >> $DAEMON_PIDS
|
2006-05-23 02:42:49 +04:00
|
|
|
sleep 2
|
|
|
|
|
2006-07-14 22:17:22 +04:00
|
|
|
echo %% url for proxy, stream
|
2006-07-16 03:06:35 +04:00
|
|
|
http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone --uncompressed http://localhost:20059/ b | \
|
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-14 22:17:22 +04:00
|
|
|
cd b
|
|
|
|
hg verify
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo %% url for proxy, pull
|
2006-07-15 01:51:36 +04:00
|
|
|
http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b-pull
|
2006-07-14 22:17:22 +04:00
|
|
|
cd b-pull
|
|
|
|
hg verify
|
|
|
|
cd ..
|
2006-05-23 02:42:49 +04:00
|
|
|
|
|
|
|
echo %% host:port for proxy
|
2006-07-15 01:51:36 +04:00
|
|
|
http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c
|
2006-05-23 02:42:49 +04:00
|
|
|
|
|
|
|
echo %% proxy url with user name and password
|
2006-07-15 01:51:36 +04:00
|
|
|
http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d
|
2006-05-23 02:42:49 +04:00
|
|
|
|
|
|
|
echo %% url with user name and password
|
2006-07-15 01:51:36 +04:00
|
|
|
http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e
|
2006-05-23 02:42:49 +04:00
|
|
|
|
|
|
|
echo %% bad host:port for proxy
|
|
|
|
http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f
|
|
|
|
|
|
|
|
exit 0
|