author | Idan Kamara <idankk86@gmail.com> |
Sun, 12 Jun 2011 17:26:20 +0300 | |
changeset 14598 | 259ba7502370 |
parent 13405 | 682edefe7dbb |
child 15446 | c5c9ca3719f9 |
child 15552 | 62c9183a0bbb |
permissions | -rw-r--r-- |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
1 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
2 |
$ hg init test |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
3 |
$ cd test |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
4 |
$ echo a > a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
5 |
$ hg ci -Ama |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
6 |
adding a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
7 |
$ cd .. |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
8 |
$ hg clone test test2 |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
9 |
updating to branch default |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
10 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
11 |
$ cd test2 |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
12 |
$ echo a >> a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
13 |
$ hg ci -mb |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
14 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
15 |
expect error, cloning not allowed |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
16 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
17 |
$ echo '[web]' > .hg/hgrc |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
18 |
$ echo 'allowpull = false' >> .hg/hgrc |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
19 |
$ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
20 |
$ cat hg.pid >> $DAEMON_PIDS |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
21 |
$ hg clone http://localhost:$HGPORT/ test3 |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
22 |
requesting all changes |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
23 |
abort: authorization failed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
24 |
[255] |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
25 |
$ "$TESTDIR/killdaemons.py" |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
26 |
|
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
27 |
serve errors |
6778
959efdac4a9c
tests: add some tests for web.allowpull configurations
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
28 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
29 |
$ cat errors.log |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
30 |
$ req() { |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
31 |
> hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
32 |
> cat hg.pid >> $DAEMON_PIDS |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
33 |
> hg --cwd ../test pull http://localhost:$HGPORT/ |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
34 |
> kill `cat hg.pid` |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
35 |
> echo % serve errors |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
36 |
> cat errors.log |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
37 |
> } |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
38 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
39 |
expect error, pulling not allowed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
40 |
|
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
41 |
$ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12480
diff
changeset
|
42 |
pulling from http://localhost:$HGPORT/ |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
43 |
searching for changes |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
44 |
abort: authorization failed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
45 |
% serve errors |