tests/test-pull
author Thomas Arendsen Hein <thomas@intevation.de>
Thu, 02 Mar 2006 09:17:04 +0100
changeset 1825 a9343f9d7365
parent 1786 ffb584a182d1
child 1929 85daa4e03b4c
permissions -rwxr-xr-x
Make hgweb.staticfile() more secure and portable. Without this, files in directories next to the static directory starting with 'static' could be retrieved, e.g. with '../static.private/foo'. Additionally staticfile now generates platform specific pathnames from the /-separated paths given in the URL. Illegal file names (e.g. containing %00) now yield a sane error message.

#!/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
cd ..

hg clone http://localhost:20059/ copy
cd copy
hg verify
hg co
cat foo
hg manifest
hg pull

kill `cat ../test/hg.pid`