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