author | Mads Kiilerich <madski@unity3d.com> |
Sun, 31 Aug 2014 13:41:09 +0200 | |
changeset 22444 | 49ea49823769 |
parent 22380 | 82b2ba904e3e |
child 22645 | 6e431e1635b6 |
permissions | -rw-r--r-- |
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
18851
diff
changeset
|
1 |
#require killdaemons |
4288
8a3e12426c03
test-push-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
2673
diff
changeset
|
2 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
3 |
$ hg init test |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
4 |
$ cd test |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
5 |
$ echo a > a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
6 |
$ hg ci -Ama |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
7 |
adding a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
8 |
$ cd .. |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
9 |
$ hg clone test test2 |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
10 |
updating to branch default |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
11 |
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
|
12 |
$ cd test2 |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
13 |
$ echo a >> a |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
14 |
$ hg ci -mb |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
|
15552
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
16 |
Cloning with a password in the URL should not save the password in .hg/hgrc: |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
17 |
|
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
18 |
$ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
19 |
$ cat hg.pid >> $DAEMON_PIDS |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
20 |
$ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3 |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
21 |
requesting all changes |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
22 |
adding changesets |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
23 |
adding manifests |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
24 |
adding file changes |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
25 |
added 2 changesets with 2 changes to 1 files |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
26 |
updating to branch default |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
27 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
28 |
$ cat test3/.hg/hgrc |
22380
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
29 |
# You may want to set your username here if it is not set |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
30 |
# globally, or this repository requires a different |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
31 |
# username from your usual configuration. If you want to |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
32 |
# set something for all of your repositories on this |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
33 |
# computer, try running the command |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
34 |
# 'hg config --edit --global' |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
35 |
# [ui] |
82b2ba904e3e
clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents:
22046
diff
changeset
|
36 |
# username = Jane Doe <jdoe@example.com> |
15552
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
37 |
[paths] |
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
38 |
default = http://foo@localhost:$HGPORT/ |
17466
d5a3bda6e170
killdaemons: take file argument explicitely
Patrick Mezard <patrick@mezard.eu>
parents:
16913
diff
changeset
|
39 |
$ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
15552
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
40 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
41 |
expect error, cloning not allowed |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
42 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
43 |
$ echo '[web]' > .hg/hgrc |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
44 |
$ echo 'allowpull = false' >> .hg/hgrc |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
45 |
$ 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
|
46 |
$ cat hg.pid >> $DAEMON_PIDS |
15552
62c9183a0bbb
clone: don't save user's password in .hg/hgrc (Issue3122)
Augie Fackler <durin42@gmail.com>
parents:
13405
diff
changeset
|
47 |
$ hg clone http://localhost:$HGPORT/ test4 |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
48 |
requesting all changes |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
49 |
abort: authorization failed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
50 |
[255] |
17466
d5a3bda6e170
killdaemons: take file argument explicitely
Patrick Mezard <patrick@mezard.eu>
parents:
16913
diff
changeset
|
51 |
$ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
52 |
|
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
53 |
serve errors |
6778
959efdac4a9c
tests: add some tests for web.allowpull configurations
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
54 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
55 |
$ cat errors.log |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
56 |
$ req() { |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
57 |
> 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
|
58 |
> 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
|
59 |
> hg --cwd ../test pull http://localhost:$HGPORT/ |
17565
f62ed3d90377
tests: enable even more Windows server tests
Patrick Mezard <patrick@mezard.eu>
parents:
17466
diff
changeset
|
60 |
> "$TESTDIR/killdaemons.py" hg.pid |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
61 |
> echo % serve errors |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
62 |
> cat errors.log |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
63 |
> } |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
64 |
|
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
65 |
expect error, pulling not allowed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
66 |
|
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
67 |
$ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12480
diff
changeset
|
68 |
pulling from http://localhost:$HGPORT/ |
12480
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
69 |
abort: authorization failed |
4a5048c359d7
tests: unify test-pull-http
Matt Mackall <mpm@selenic.com>
parents:
10398
diff
changeset
|
70 |
% serve errors |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15555
diff
changeset
|
71 |
|
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15555
diff
changeset
|
72 |
$ cd .. |