2008-06-29 13:02:19 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cp "$TESTDIR"/printenv.py .
|
|
|
|
|
|
|
|
hg init test
|
|
|
|
cd test
|
|
|
|
echo a > a
|
2009-04-26 16:29:02 +04:00
|
|
|
hg ci -Ama
|
2008-06-29 13:02:19 +04:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
hg clone test test2
|
|
|
|
cd test2
|
|
|
|
echo a >> a
|
2009-04-26 16:29:02 +04:00
|
|
|
hg ci -mb
|
2008-06-29 13:02:19 +04:00
|
|
|
|
|
|
|
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
|
2010-02-08 04:53:41 +03:00
|
|
|
hg clone http://localhost:$HGPORT/ test3 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
|
2009-01-03 22:20:40 +03:00
|
|
|
"$TESTDIR/killdaemons.py"
|
2008-06-29 13:02:19 +04:00
|
|
|
echo % serve errors
|
|
|
|
cat errors.log
|
|
|
|
|
|
|
|
req() {
|
|
|
|
hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
|
|
|
|
cat hg.pid >> $DAEMON_PIDS
|
2010-02-08 04:53:41 +03:00
|
|
|
hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
|
2008-06-29 13:02:19 +04:00
|
|
|
kill `cat hg.pid`
|
|
|
|
echo % serve errors
|
|
|
|
cat errors.log
|
|
|
|
}
|
|
|
|
|
|
|
|
echo % expect error, pulling not allowed
|
|
|
|
req
|