Mercurial > hg
comparison tests/test-pull-http @ 6778:959efdac4a9c
tests: add some tests for web.allowpull configurations
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 29 Jun 2008 11:02:19 +0200 |
parents | tests/test-push-http@f53b9a383476 |
children | 4afc3208a7b8 |
comparison
equal
deleted
inserted
replaced
6777:44c5157474e7 | 6778:959efdac4a9c |
---|---|
1 #!/bin/sh | |
2 | |
3 cp "$TESTDIR"/printenv.py . | |
4 | |
5 hg init test | |
6 cd test | |
7 echo a > a | |
8 hg ci -Ama -d '0 0' | |
9 | |
10 cd .. | |
11 hg clone test test2 | |
12 cd test2 | |
13 echo a >> a | |
14 hg ci -mb -d '0 0' | |
15 | |
16 echo % expect error, cloning not allowed | |
17 echo '[web]' > .hg/hgrc | |
18 echo 'allowpull = false' >> .hg/hgrc | |
19 hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
20 cat hg.pid >> $DAEMON_PIDS | |
21 hg clone http://localhost:$HGPORT/ test3 | sed -e 's,:[0-9][0-9]*/,/,' | |
22 kill `cat hg.pid` | |
23 echo % serve errors | |
24 cat errors.log | |
25 | |
26 req() { | |
27 hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
28 cat hg.pid >> $DAEMON_PIDS | |
29 hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' | |
30 kill `cat hg.pid` | |
31 echo % serve errors | |
32 cat errors.log | |
33 } | |
34 | |
35 echo % expect error, pulling not allowed | |
36 req |