Show More
@@ -1,63 +1,65 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | cp "$TESTDIR"/printenv.py . | |
|
4 | ||
|
3 | 5 | hg init test |
|
4 | 6 | cd test |
|
5 | 7 | echo a > a |
|
6 | hg ci -Ama | |
|
8 | hg ci -Ama -d '0 0' | |
|
7 | 9 | |
|
8 | 10 | cd .. |
|
9 | 11 | hg clone test test2 |
|
10 | 12 | cd test2 |
|
11 | 13 | echo a >> a |
|
12 | hg ci -mb | |
|
14 | hg ci -mb -d '0 0' | |
|
13 | 15 | |
|
14 | 16 | cd ../test |
|
15 | 17 | |
|
16 | 18 | echo % expect ssl error |
|
17 | 19 | hg serve -p 20059 -d --pid-file=hg.pid |
|
18 | 20 | cat hg.pid >> $DAEMON_PIDS |
|
19 | 21 | hg --cwd ../test2 push http://localhost:20059/ |
|
20 | 22 | kill `cat hg.pid` |
|
21 | 23 | |
|
22 | 24 | echo % expect authorization error |
|
23 | 25 | echo '[web]' > .hg/hgrc |
|
24 | 26 | echo 'push_ssl = false' >> .hg/hgrc |
|
25 | 27 | hg serve -p 20059 -d --pid-file=hg.pid |
|
26 | 28 | cat hg.pid >> $DAEMON_PIDS |
|
27 | 29 | hg --cwd ../test2 push http://localhost:20059/ |
|
28 | 30 | kill `cat hg.pid` |
|
29 | 31 | |
|
30 | 32 | echo % expect authorization error: must have authorized user |
|
31 | 33 | echo 'allow_push = unperson' >> .hg/hgrc |
|
32 | 34 | hg serve -p 20059 -d --pid-file=hg.pid |
|
33 | 35 | cat hg.pid >> $DAEMON_PIDS |
|
34 | 36 | hg --cwd ../test2 push http://localhost:20059/ |
|
35 | 37 | kill `cat hg.pid` |
|
36 | 38 | |
|
37 | 39 | echo % expect success |
|
38 | 40 | echo 'allow_push = *' >> .hg/hgrc |
|
39 | 41 | echo '[hooks]' >> .hg/hgrc |
|
40 |
echo 'changegroup = |
|
|
42 | echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc | |
|
41 | 43 | hg serve -p 20059 -d --pid-file=hg.pid |
|
42 | 44 | cat hg.pid >> $DAEMON_PIDS |
|
43 | 45 | hg --cwd ../test2 push http://localhost:20059/ |
|
44 | 46 | kill `cat hg.pid` |
|
45 | 47 | hg rollback |
|
46 | 48 | |
|
47 | sed 's/\(remote:http.*\):.*/\1/' $HGTMP/urls | |
|
49 | cat ../urls | |
|
48 | 50 | |
|
49 | 51 | echo % expect authorization error: all users denied |
|
50 | 52 | echo '[web]' > .hg/hgrc |
|
51 | 53 | echo 'push_ssl = false' >> .hg/hgrc |
|
52 | 54 | echo 'deny_push = *' >> .hg/hgrc |
|
53 | 55 | hg serve -p 20059 -d --pid-file=hg.pid |
|
54 | 56 | cat hg.pid >> $DAEMON_PIDS |
|
55 | 57 | hg --cwd ../test2 push http://localhost:20059/ |
|
56 | 58 | kill `cat hg.pid` |
|
57 | 59 | |
|
58 | 60 | echo % expect authorization error: some users denied, users must be authenticated |
|
59 | 61 | echo 'deny_push = unperson' >> .hg/hgrc |
|
60 | 62 | hg serve -p 20059 -d --pid-file=hg.pid |
|
61 | 63 | cat hg.pid >> $DAEMON_PIDS |
|
62 | 64 | hg --cwd ../test2 push http://localhost:20059/ |
|
63 | 65 | kill `cat hg.pid` |
@@ -1,31 +1,31 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 3 | % expect ssl error |
|
4 | 4 | pushing to http://localhost:20059/ |
|
5 | 5 | searching for changes |
|
6 | 6 | ssl required |
|
7 | 7 | % expect authorization error |
|
8 | 8 | pushing to http://localhost:20059/ |
|
9 | 9 | searching for changes |
|
10 | 10 | push not authorized |
|
11 | 11 | % expect authorization error: must have authorized user |
|
12 | 12 | pushing to http://localhost:20059/ |
|
13 | 13 | searching for changes |
|
14 | 14 | push not authorized |
|
15 | 15 | % expect success |
|
16 | 16 | pushing to http://localhost:20059/ |
|
17 | 17 | searching for changes |
|
18 | 18 | adding changesets |
|
19 | 19 | adding manifests |
|
20 | 20 | adding file changes |
|
21 | 21 | added 1 changesets with 1 changes to 1 files |
|
22 | 22 | rolling back last transaction |
|
23 | changegroup: u=remote:http | |
|
23 | changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http | |
|
24 | 24 | % expect authorization error: all users denied |
|
25 | 25 | pushing to http://localhost:20059/ |
|
26 | 26 | searching for changes |
|
27 | 27 | push not authorized |
|
28 | 28 | % expect authorization error: some users denied, users must be authenticated |
|
29 | 29 | pushing to http://localhost:20059/ |
|
30 | 30 | searching for changes |
|
31 | 31 | push not authorized |
General Comments 0
You need to be logged in to leave comments.
Login now