Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-push-http @ 4492:b79cdb7f0597
patch.diff: avoid calling workingctx().manifest()
Right now, to generate the manifest of the working dir, we have to
perform a full walk of the working dir, which will be very slow,
especially if we're interested in only a small part of it.
Since we use the manifest only to find out the mode of files for git
patches, manually build an execf function to do it.
This should fix issue567.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sun, 03 Jun 2007 14:38:52 -0300 |
parents | 8a3e12426c03 |
children | e3a0c092b4e2 |
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 |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
8 hg ci -Ama -d '0 0' |
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 |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
14 hg ci -mb -d '0 0' |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
16 cd ../test |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
17 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
18 echo % expect ssl error |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
19 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
20 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
21 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
22 kill `cat hg.pid` |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
23 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
24 echo % expect authorization error |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 echo '[web]' > .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
26 echo 'push_ssl = false' >> .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
27 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
28 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
30 kill `cat hg.pid` |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
31 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
32 echo % expect authorization error: must have authorized user |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
33 echo 'allow_push = unperson' >> .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
34 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
35 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
36 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
37 kill `cat hg.pid` |
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:
2570
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 |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
43 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
44 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
45 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
46 kill `cat hg.pid` |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
47 hg rollback |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
48 |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
49 cat ../urls |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2570
diff
changeset
|
50 |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
51 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:
2570
diff
changeset
|
52 echo '[web]' > .hg/hgrc |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2570
diff
changeset
|
53 echo 'push_ssl = false' >> .hg/hgrc |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
54 echo 'deny_push = *' >> .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
55 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
56 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
57 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
58 kill `cat hg.pid` |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
59 |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
60 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
|
61 echo 'deny_push = unperson' >> .hg/hgrc |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
62 hg serve -p 20059 -d --pid-file=hg.pid |
2570
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2481
diff
changeset
|
63 cat hg.pid >> $DAEMON_PIDS |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
64 hg --cwd ../test2 push http://localhost:20059/ |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
65 kill `cat hg.pid` |