Show More
@@ -1,87 +1,87 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ hg init test |
|
3 | 3 | $ cd test |
|
4 | 4 | $ echo a > a |
|
5 | 5 | $ hg ci -Ama |
|
6 | 6 | adding a |
|
7 | 7 | $ cd .. |
|
8 | 8 | $ hg clone test test2 |
|
9 | 9 | updating to branch default |
|
10 | 10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 11 | $ cd test2 |
|
12 | 12 | $ echo a >> a |
|
13 | 13 | $ hg ci -mb |
|
14 | 14 | $ req() { |
|
15 | 15 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
16 | 16 | > cat hg.pid >> $DAEMON_PIDS |
|
17 | 17 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
18 | > kill `cat hg.pid` | |
|
18 | > "$TESTDIR/killdaemons.py" | |
|
19 | 19 | > echo % serve errors |
|
20 | 20 | > cat errors.log |
|
21 | 21 | > } |
|
22 | 22 | $ cd ../test |
|
23 | 23 | |
|
24 | 24 | expect ssl error |
|
25 | 25 | |
|
26 | 26 | $ req |
|
27 | 27 | pushing to http://localhost:$HGPORT/ |
|
28 | 28 | searching for changes |
|
29 | 29 | remote: ssl required |
|
30 | 30 | % serve errors |
|
31 | 31 | |
|
32 | 32 | expect authorization error |
|
33 | 33 | |
|
34 | 34 | $ echo '[web]' > .hg/hgrc |
|
35 | 35 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
36 | 36 | $ req |
|
37 | 37 | pushing to http://localhost:$HGPORT/ |
|
38 | 38 | searching for changes |
|
39 | 39 | abort: authorization failed |
|
40 | 40 | % serve errors |
|
41 | 41 | |
|
42 | 42 | expect authorization error: must have authorized user |
|
43 | 43 | |
|
44 | 44 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
45 | 45 | $ req |
|
46 | 46 | pushing to http://localhost:$HGPORT/ |
|
47 | 47 | searching for changes |
|
48 | 48 | abort: authorization failed |
|
49 | 49 | % serve errors |
|
50 | 50 | |
|
51 | 51 | expect success |
|
52 | 52 | |
|
53 | 53 | $ echo 'allow_push = *' >> .hg/hgrc |
|
54 | 54 | $ echo '[hooks]' >> .hg/hgrc |
|
55 | 55 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc |
|
56 | 56 | $ req |
|
57 | 57 | pushing to http://localhost:$HGPORT/ |
|
58 | 58 | searching for changes |
|
59 | 59 | remote: adding changesets |
|
60 | 60 | remote: adding manifests |
|
61 | 61 | remote: adding file changes |
|
62 | 62 | remote: added 1 changesets with 1 changes to 1 files |
|
63 | 63 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
|
64 | 64 | % serve errors |
|
65 | 65 | $ hg rollback |
|
66 | 66 | repository tip rolled back to revision 0 (undo serve) |
|
67 | 67 | working directory now based on revision 0 |
|
68 | 68 | |
|
69 | 69 | expect authorization error: all users denied |
|
70 | 70 | |
|
71 | 71 | $ echo '[web]' > .hg/hgrc |
|
72 | 72 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
73 | 73 | $ echo 'deny_push = *' >> .hg/hgrc |
|
74 | 74 | $ req |
|
75 | 75 | pushing to http://localhost:$HGPORT/ |
|
76 | 76 | searching for changes |
|
77 | 77 | abort: authorization failed |
|
78 | 78 | % serve errors |
|
79 | 79 | |
|
80 | 80 | expect authorization error: some users denied, users must be authenticated |
|
81 | 81 | |
|
82 | 82 | $ echo 'deny_push = unperson' >> .hg/hgrc |
|
83 | 83 | $ req |
|
84 | 84 | pushing to http://localhost:$HGPORT/ |
|
85 | 85 | searching for changes |
|
86 | 86 | abort: authorization failed |
|
87 | 87 | % serve errors |
General Comments 0
You need to be logged in to leave comments.
Login now