annotate tests/test-push-http-bundle1.t @ 26120:1a45e49a6bed stable 3.5.1

hgweb: fix trust of templates path (BC) Long ago we disabled trust of the templates path with a comment describing the (insecure) behavior before the change. At some later refactor, the code was apparently changed back to match the comment, unaware that the intent of the comment was to describe the behavior to avoid. This change disables the trust and updates the comment to explicitly say not only what the old problem was, but also that it was in fact a problem and the action taken to prevent it. Impact: prior to this change, if you had a UNIX-based hgweb server where users can write hgrc files, those users could potentially read any file readable by the web server. This is marked as a backwards compatibility issue because people may have configured templates without proper trust settings. Issue spotted by Greg Szorc.
author Matt Mackall <mpm@selenic.com>
date Tue, 01 Sep 2015 16:08:07 -0500
parents d19787db6fe0
children 59c410db8c68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 20966
diff changeset
1 #require killdaemons
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
2
25389
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
3 This test checks behavior related to bundle1 that changed or is likely
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
4 to change with bundle2. Feel free to factor out any part of the test
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
5 which does not need to exist to keep bundle1 working.
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
6
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
7 $ cat << EOF >> $HGRCPATH
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
8 > [experimental]
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
9 > # This test is dedicated to interaction through old bundle
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
10 > bundle2-exp = False
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
11 > EOF
d6389553b6a1 test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
12
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
13 $ hg init test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
14 $ cd test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
15 $ echo a > a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
16 $ hg ci -Ama
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
17 adding a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
18 $ cd ..
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
19 $ hg clone test test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
20 updating to branch default
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
22 $ cd test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
23 $ echo a >> a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
24 $ hg ci -mb
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
25 $ req() {
12743
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
26 > 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
27 > 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
28 > hg --cwd ../test2 push http://localhost:$HGPORT/
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
29 > exitstatus=$?
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
30 > killdaemons.py
12743
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
31 > echo % serve errors
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
32 > cat errors.log
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
33 > return $exitstatus
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
34 > }
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
35 $ cd ../test
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
36
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
37 expect ssl error
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
38
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
39 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
40 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
41 searching for changes
17456
59a168019255 hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents: 17455
diff changeset
42 abort: HTTP Error 403: ssl required
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
43 % serve errors
17456
59a168019255 hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents: 17455
diff changeset
44 [255]
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
45
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
46 expect authorization error
6167
f53b9a383476 tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5386
diff changeset
47
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
48 $ echo '[web]' > .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
49 $ echo 'push_ssl = false' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
50 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
51 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
52 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
53 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
54 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
55 [255]
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
56
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
57 expect authorization error: must have authorized user
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
58
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
59 $ echo 'allow_push = unperson' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
60 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
61 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
62 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
63 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
64 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
65 [255]
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
66
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
67 expect success
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
68
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
69 $ echo 'allow_push = *' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
70 $ echo '[hooks]' >> .hg/hgrc
25478
d19787db6fe0 tests: simplify printenv calls
Matt Mackall <mpm@selenic.com>
parents: 25474
diff changeset
71 $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc
d19787db6fe0 tests: simplify printenv calls
Matt Mackall <mpm@selenic.com>
parents: 25474
diff changeset
72 $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
73 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
74 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
75 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
76 remote: adding changesets
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
77 remote: adding manifests
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
78 remote: adding file changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
79 remote: added 1 changesets with 1 changes to 1 files
24740
d283517b260b transaction: introduce a transaction ID, to be available to all hooks
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22960
diff changeset
80 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob)
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
81 % serve errors
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
82 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13405
diff changeset
83 repository tip rolled back to revision 0 (undo serve)
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
84
14093
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
85 expect success, server lacks the httpheader capability
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
86
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
87 $ CAP=httpheader
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
88 $ . "$TESTDIR/notcapable"
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
89 $ req
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
90 pushing to http://localhost:$HGPORT/
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
91 searching for changes
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
92 remote: adding changesets
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
93 remote: adding manifests
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
94 remote: adding file changes
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
95 remote: added 1 changesets with 1 changes to 1 files
24740
d283517b260b transaction: introduce a transaction ID, to be available to all hooks
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22960
diff changeset
96 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob)
14093
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
97 % serve errors
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
98 $ hg rollback
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
99 repository tip rolled back to revision 0 (undo serve)
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
100
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
101 expect success, server lacks the unbundlehash capability
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
102
14011
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13946
diff changeset
103 $ CAP=unbundlehash
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13946
diff changeset
104 $ . "$TESTDIR/notcapable"
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
105 $ req
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
106 pushing to http://localhost:$HGPORT/
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
107 searching for changes
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
108 remote: adding changesets
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
109 remote: adding manifests
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
110 remote: adding file changes
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
111 remote: added 1 changesets with 1 changes to 1 files
24740
d283517b260b transaction: introduce a transaction ID, to be available to all hooks
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22960
diff changeset
112 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob)
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
113 % serve errors
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
114 $ hg rollback
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
115 repository tip rolled back to revision 0 (undo serve)
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
116
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
117 expect push success, phase change failure
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
118
17842
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
119 $ cat > .hg/hgrc <<EOF
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
120 > [web]
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
121 > push_ssl = false
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
122 > allow_push = *
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
123 > [hooks]
25478
d19787db6fe0 tests: simplify printenv calls
Matt Mackall <mpm@selenic.com>
parents: 25474
diff changeset
124 > prepushkey = printenv.py prepushkey 1
17842
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
125 > EOF
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
126 $ req
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
127 pushing to http://localhost:$HGPORT/
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
128 searching for changes
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
129 remote: adding changesets
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
130 remote: adding manifests
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
131 remote: adding file changes
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
132 remote: added 1 changesets with 1 changes to 1 files
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
133 % serve errors
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
134
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
135 expect phase change success
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
136
25478
d19787db6fe0 tests: simplify printenv calls
Matt Mackall <mpm@selenic.com>
parents: 25474
diff changeset
137 $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
138 $ req
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
139 pushing to http://localhost:$HGPORT/
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
140 searching for changes
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
141 no changes found
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
142 % serve errors
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
143 [1]
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
144 $ hg rollback
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
145 repository tip rolled back to revision 0 (undo serve)
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
146
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
147 expect authorization error: all users denied
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
148
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
149 $ echo '[web]' > .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
150 $ echo 'push_ssl = false' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
151 $ echo 'deny_push = *' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
152 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
153 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
154 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
155 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
156 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
157 [255]
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
158
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
159 expect authorization error: some users denied, users must be authenticated
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
160
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
161 $ echo 'deny_push = unperson' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
162 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
163 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
164 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
165 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
166 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
167 [255]
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15933
diff changeset
168
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15933
diff changeset
169 $ cd ..