Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-http-proxy @ 2612:ffb895f16925
add support for streaming clone.
existing clone code uses pull to get changes from remote repo. is very
slow, uses lots of memory and cpu.
new clone code has server write file data straight to client, client
writes file data straight to disk. memory and cpu used are very low,
clone is much faster over lan.
new client can still clone with pull, can still clone from older servers.
new server can still serve older clients.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 14 Jul 2006 11:17:22 -0700 |
parents | 83cfd95eafb5 |
children | 479e26afa10f |
comparison
equal
deleted
inserted
replaced
2611:1b4eb1f92433 | 2612:ffb895f16925 |
---|---|
11 ("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null & | 11 ("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null & |
12 echo $! > proxy.pid) | 12 echo $! > proxy.pid) |
13 cat proxy.pid >> $DAEMON_PIDS | 13 cat proxy.pid >> $DAEMON_PIDS |
14 sleep 2 | 14 sleep 2 |
15 | 15 |
16 echo %% url for proxy | 16 echo %% url for proxy, stream |
17 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b | 17 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b | \ |
18 sed -e 's/[0-9][0-9.]*/XXX/g' | |
19 cd b | |
20 hg verify | |
21 cd .. | |
22 | |
23 echo %% url for proxy, pull | |
24 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone --pull http://localhost:20059/ b-pull | |
25 cd b-pull | |
26 hg verify | |
27 cd .. | |
18 | 28 |
19 echo %% host:port for proxy | 29 echo %% host:port for proxy |
20 http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c | 30 http_proxy=localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ c |
21 | 31 |
22 echo %% proxy url with user name and password | 32 echo %% proxy url with user name and password |
23 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d | 33 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ d |
24 | 34 |
25 echo %% url with user name and password | 35 echo %% url with user name and password |
26 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e | 36 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://user:passwd@localhost:20059/ e |
27 | 37 |
28 echo %% bad host:port for proxy | 38 echo %% bad host:port for proxy |
29 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f | 39 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f |
30 | 40 |
31 exit 0 | 41 exit 0 |