sapling/tests/test-pull-http
Martin Geisler 65537ad291 tests: removed redundant "-d '0 0'" from test scripts
The tests are executed with a .hgrc file which adds "-d '0 0'" by
default.
2009-04-26 14:29:02 +02:00

37 lines
734 B
Bash
Executable File

#!/bin/sh
cp "$TESTDIR"/printenv.py .
hg init test
cd test
echo a > a
hg ci -Ama
cd ..
hg clone test test2
cd test2
echo a >> a
hg ci -mb
echo % expect error, cloning not allowed
echo '[web]' > .hg/hgrc
echo 'allowpull = false' >> .hg/hgrc
hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
cat hg.pid >> $DAEMON_PIDS
hg clone http://localhost:$HGPORT/ test3 | sed -e 's,:[0-9][0-9]*/,/,'
"$TESTDIR/killdaemons.py"
echo % serve errors
cat errors.log
req() {
hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
cat hg.pid >> $DAEMON_PIDS
hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
kill `cat hg.pid`
echo % serve errors
cat errors.log
}
echo % expect error, pulling not allowed
req