view tests/test-bundle @ 2434:a2df85adface

http server: support persistent connections. only "hg serve" affected yet. http server running cgi script will not use persistent connections. support for fastcgi will help that. clients that support keepalive can use one tcp connection for all commands during clone and pull. this makes latency of binary search during pull much lower over wan. if server does not know content-length, it will force connection to close at end. right fix is to use chunked transfer-encoding but this is easier and does not hurt performance. only command that is affected is "changegroup" which is always last command during a pull.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 15 Jun 2006 12:55:58 -0700
parents 89b15372df18
children 109a22f5434a
line wrap: on
line source

#!/bin/sh

hg init test
cd test
echo 0 > afile
hg add afile
hg commit -m "0.0" -d "1000000 0"
echo 1 >> afile
hg commit -m "0.1" -d "1000000 0"
echo 2 >> afile
hg commit -m "0.2" -d "1000000 0"
echo 3 >> afile
hg commit -m "0.3" -d "1000000 0"
hg update -C 0
echo 1 >> afile
hg commit -m "1.1" -d "1000000 0"
echo 2 >> afile
hg commit -m "1.2" -d "1000000 0"
echo "a line" > fred
echo 3 >> afile
hg add fred
hg commit -m "1.3" -d "1000000 0"
hg mv afile adifferentfile
hg commit -m "1.3m" -d "1000000 0"
hg update -C 3
hg mv afile anotherfile
hg commit -m "0.3m" -d "1000000 0"
hg verify
cd ..
hg init empty
hg -R test bundle full.hg empty
hg -R test unbundle full.hg
hg -R empty unbundle full.hg
hg -R empty heads
hg -R empty verify

rm -rf empty
hg init empty
cd empty
hg -R bundle://../full.hg log
#doesn't work (yet ?)
#hg -R bundle://../full.hg verify
hg pull bundle://../full.hg
cd ..

rm -rf empty
hg init empty
hg clone -r 3 test partial
hg clone partial partial2
cd partial
hg -R bundle://../full.hg log
hg incoming bundle://../full.hg
hg -R bundle://../full.hg outgoing ../partial2
cd ..