Mercurial > hg
annotate tests/test-push-http @ 9410:1c83938b6a8e
extensions: load and configure extensions in well-defined phases
Extensions are now loaded with a call-graph like this:
dispatch._dispatch
extensions.loadall
extensions.load
# add foo module to extensions._extensions
extensions.load
# add bar module to extensions._extensions
foo.uisetup(ui)
bar.uisetup(ui)
foo.extsetup()
bar.extsetup()
commands.table.update(foo.cmdtable)
commands.table.update(bar.cmdtable)
hg.repository
foo.reposetup(ui, repo)
bar.reposetup(ui, repo)
The uisetup calls could easily be moved out to dispatch._dispatch, but
have been kept in extensions.loadall since at least TortoiseHg calls
extensions.loadall and expects it to call uisetup.
The extensions.load function called uisetup. It now has an unused ui
argument which has been kept for backwards compatibility.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 29 Aug 2009 00:29:16 +0200 |
parents | 6c82beaaa11a |
children | ace3cf2bc991 |
rev | line source |
---|---|
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
3 cp "$TESTDIR"/printenv.py . |
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
4 |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
5 hg init test |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 cd test |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
7 echo a > a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
6167
diff
changeset
|
8 hg ci -Ama |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
10 cd .. |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
11 hg clone test test2 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 cd test2 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 echo a >> a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
6167
diff
changeset
|
14 hg ci -mb |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
16 req() { |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
17 hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
18 cat hg.pid >> $DAEMON_PIDS |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
19 hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
20 kill `cat hg.pid` |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
21 echo % serve errors |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
22 cat errors.log |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
23 } |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
24 |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 cd ../test |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
26 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
27 echo % expect ssl error |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
28 req |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
30 echo % expect authorization error |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
31 echo '[web]' > .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
32 echo 'push_ssl = false' >> .hg/hgrc |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
33 req |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
34 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
35 echo % expect authorization error: must have authorized user |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
36 echo 'allow_push = unperson' >> .hg/hgrc |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
37 req |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
38 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
39 echo % expect success |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
40 echo 'allow_push = *' >> .hg/hgrc |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
41 echo '[hooks]' >> .hg/hgrc |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
42 echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
43 req |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
44 |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
45 cat ../urls |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
46 |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
47 hg rollback |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
48 echo % expect authorization error: all users denied |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
49 echo '[web]' > .hg/hgrc |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
50 echo 'push_ssl = false' >> .hg/hgrc |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
51 echo 'deny_push = *' >> .hg/hgrc |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
52 req |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
53 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
54 echo % expect authorization error: some users denied, users must be authenticated |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
55 echo 'deny_push = unperson' >> .hg/hgrc |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
56 req |