tests/test-http
author Vadim Gelfer <vadim.gelfer@gmail.com>
Fri, 14 Jul 2006 11:17:22 -0700
changeset 2612 ffb895f16925
child 2613 479e26afa10f
permissions -rwxr-xr-x
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.

#!/bin/sh

mkdir test
cd test
echo foo>foo
hg init
hg addremove
hg commit -m 1
hg verify
hg serve -p 20059 -d --pid-file=hg.pid
cat hg.pid >> $DAEMON_PIDS
cd ..

echo % clone via stream
http_proxy= hg clone http://localhost:20059/ copy 2>&1 | \
  sed -e 's/[0-9][0-9.]*/XXX/g'
cd copy
hg verify

cd ..

echo % clone via pull
http_proxy= hg clone --pull http://localhost:20059/ copy-pull
cd copy-pull
hg verify