Mercurial > hg
comparison tests/test-push-http @ 4288:8a3e12426c03
test-push-http: use printenv.py
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 26 Mar 2007 23:50:00 -0300 |
parents | 109a22f5434a |
children | e3a0c092b4e2 |
comparison
equal
deleted
inserted
replaced
4287:ce71da8ab4f5 | 4288:8a3e12426c03 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | |
3 cp "$TESTDIR"/printenv.py . | |
2 | 4 |
3 hg init test | 5 hg init test |
4 cd test | 6 cd test |
5 echo a > a | 7 echo a > a |
6 hg ci -Ama | 8 hg ci -Ama -d '0 0' |
7 | 9 |
8 cd .. | 10 cd .. |
9 hg clone test test2 | 11 hg clone test test2 |
10 cd test2 | 12 cd test2 |
11 echo a >> a | 13 echo a >> a |
12 hg ci -mb | 14 hg ci -mb -d '0 0' |
13 | 15 |
14 cd ../test | 16 cd ../test |
15 | 17 |
16 echo % expect ssl error | 18 echo % expect ssl error |
17 hg serve -p 20059 -d --pid-file=hg.pid | 19 hg serve -p 20059 -d --pid-file=hg.pid |
35 kill `cat hg.pid` | 37 kill `cat hg.pid` |
36 | 38 |
37 echo % expect success | 39 echo % expect success |
38 echo 'allow_push = *' >> .hg/hgrc | 40 echo 'allow_push = *' >> .hg/hgrc |
39 echo '[hooks]' >> .hg/hgrc | 41 echo '[hooks]' >> .hg/hgrc |
40 echo 'changegroup = echo changegroup: u=$HG_URL >> $HGTMP/urls' >> .hg/hgrc | 42 echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc |
41 hg serve -p 20059 -d --pid-file=hg.pid | 43 hg serve -p 20059 -d --pid-file=hg.pid |
42 cat hg.pid >> $DAEMON_PIDS | 44 cat hg.pid >> $DAEMON_PIDS |
43 hg --cwd ../test2 push http://localhost:20059/ | 45 hg --cwd ../test2 push http://localhost:20059/ |
44 kill `cat hg.pid` | 46 kill `cat hg.pid` |
45 hg rollback | 47 hg rollback |
46 | 48 |
47 sed 's/\(remote:http.*\):.*/\1/' $HGTMP/urls | 49 cat ../urls |
48 | 50 |
49 echo % expect authorization error: all users denied | 51 echo % expect authorization error: all users denied |
50 echo '[web]' > .hg/hgrc | 52 echo '[web]' > .hg/hgrc |
51 echo 'push_ssl = false' >> .hg/hgrc | 53 echo 'push_ssl = false' >> .hg/hgrc |
52 echo 'deny_push = *' >> .hg/hgrc | 54 echo 'deny_push = *' >> .hg/hgrc |