Show More
@@ -0,0 +1,12 b'' | |||||
|
1 | adding a | |||
|
2 | updating working directory | |||
|
3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
4 | % expect error, cloning not allowed | |||
|
5 | abort: error: | |||
|
6 | requesting all changes | |||
|
7 | % serve errors | |||
|
8 | % expect error, pulling not allowed | |||
|
9 | abort: error: | |||
|
10 | pulling from http://localhost/ | |||
|
11 | searching for changes | |||
|
12 | % serve errors |
@@ -13,44 +13,24 b' cd test2' | |||||
13 | echo a >> a |
|
13 | echo a >> a | |
14 | hg ci -mb -d '0 0' |
|
14 | hg ci -mb -d '0 0' | |
15 |
|
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 | ||||
16 | req() { |
|
26 | req() { | |
17 | hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
27 | hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
18 | cat hg.pid >> $DAEMON_PIDS |
|
28 | cat hg.pid >> $DAEMON_PIDS | |
19 |
hg --cwd ../test |
|
29 | hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' | |
20 | kill `cat hg.pid` |
|
30 | kill `cat hg.pid` | |
21 | echo % serve errors |
|
31 | echo % serve errors | |
22 | cat errors.log |
|
32 | cat errors.log | |
23 | } |
|
33 | } | |
24 |
|
34 | |||
25 | cd ../test |
|
35 | echo % expect error, pulling not allowed | |
26 |
|
||||
27 | echo % expect ssl error |
|
|||
28 | req |
|
|||
29 |
|
||||
30 | echo % expect authorization error |
|
|||
31 | echo '[web]' > .hg/hgrc |
|
|||
32 | echo 'push_ssl = false' >> .hg/hgrc |
|
|||
33 | req |
|
|||
34 |
|
||||
35 | echo % expect authorization error: must have authorized user |
|
|||
36 | echo 'allow_push = unperson' >> .hg/hgrc |
|
|||
37 | req |
|
36 | req | |
38 |
|
||||
39 | echo % expect success |
|
|||
40 | echo 'allow_push = *' >> .hg/hgrc |
|
|||
41 | echo '[hooks]' >> .hg/hgrc |
|
|||
42 | echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc |
|
|||
43 | req |
|
|||
44 |
|
||||
45 | cat ../urls |
|
|||
46 |
|
||||
47 | hg rollback |
|
|||
48 | echo % expect authorization error: all users denied |
|
|||
49 | echo '[web]' > .hg/hgrc |
|
|||
50 | echo 'push_ssl = false' >> .hg/hgrc |
|
|||
51 | echo 'deny_push = *' >> .hg/hgrc |
|
|||
52 | req |
|
|||
53 |
|
||||
54 | echo % expect authorization error: some users denied, users must be authenticated |
|
|||
55 | echo 'deny_push = unperson' >> .hg/hgrc |
|
|||
56 | req |
|
General Comments 0
You need to be logged in to leave comments.
Login now