Show More
@@ -1,36 +1,46 b'' | |||||
1 | #!/bin/sh |
|
|||
2 |
|
||||
3 | cp "$TESTDIR"/printenv.py . |
|
|||
4 |
|
1 | |||
5 | hg init test |
|
2 | $ cp "$TESTDIR"/printenv.py . | |
6 | cd test |
|
3 | $ hg init test | |
7 | echo a > a |
|
4 | $ cd test | |
8 | hg ci -Ama |
|
5 | $ echo a > a | |
|
6 | $ hg ci -Ama | |||
|
7 | adding a | |||
|
8 | $ cd .. | |||
|
9 | $ hg clone test test2 | |||
|
10 | updating to branch default | |||
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
12 | $ cd test2 | |||
|
13 | $ echo a >> a | |||
|
14 | $ hg ci -mb | |||
9 |
|
15 | |||
10 | cd .. |
|
16 | expect error, cloning not allowed | |
11 | hg clone test test2 |
|
|||
12 | cd test2 |
|
|||
13 | echo a >> a |
|
|||
14 | hg ci -mb |
|
|||
15 |
|
17 | |||
16 | echo % expect error, cloning not allowed |
|
18 | $ echo '[web]' > .hg/hgrc | |
17 |
echo ' |
|
19 | $ echo 'allowpull = false' >> .hg/hgrc | |
18 | echo 'allowpull = false' >> .hg/hgrc |
|
20 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
19 | hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
21 | $ cat hg.pid >> $DAEMON_PIDS | |
20 | cat hg.pid >> $DAEMON_PIDS |
|
22 | $ hg clone http://localhost:$HGPORT/ test3 | |
21 | hg clone http://localhost:$HGPORT/ test3 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
23 | requesting all changes | |
22 | "$TESTDIR/killdaemons.py" |
|
24 | abort: authorization failed | |
23 | echo % serve errors |
|
25 | [255] | |
24 | cat errors.log |
|
26 | $ "$TESTDIR/killdaemons.py" | |
|
27 | ||||
|
28 | serve errors | |||
25 |
|
29 | |||
26 | req() { |
|
30 | $ cat errors.log | |
27 | hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
31 | $ req() { | |
28 | cat hg.pid >> $DAEMON_PIDS |
|
32 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
29 | hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
33 | > cat hg.pid >> $DAEMON_PIDS | |
30 | kill `cat hg.pid` |
|
34 | > hg --cwd ../test pull http://localhost:$HGPORT/ | |
31 | echo % serve errors |
|
35 | > kill `cat hg.pid` | |
32 | cat errors.log |
|
36 | > echo % serve errors | |
33 | } |
|
37 | > cat errors.log | |
|
38 | > } | |||
34 |
|
39 | |||
35 |
|
|
40 | expect error, pulling not allowed | |
36 | req |
|
41 | ||
|
42 | $ req | |||
|
43 | pulling from http://localhost:*/ (glob) | |||
|
44 | searching for changes | |||
|
45 | abort: authorization failed | |||
|
46 | % serve errors |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now