Mercurial > public > mercurial-scm > hg
annotate tests/test-push-http.out @ 11109:a2bc2f2d77a9
subrepo: normalize path part of URLs so that pulling subrepos from webdir works
For a "all projects at root" repo layout eg:
/main
/sub
Where subrepos are used such that a clone of main has this layout:
./main/
./main/.hgsub
./main/sub/
And the .hgsub content is:
sub = ../sub
This allows a pull from a hgweb where main and sub are exposed
at the root (or same directory level)
The current code doesn't normalize the path component of a pull
url. this results in trying to pull from
http://server.com/hg/main/../sub
Current hgweb implementation doesn't reduce the path component
so this results in a 404 error though everything is setup logically.
This patch adresses this 404 error on the puller side
normalizing the URLs used for pulling sub repos. For this
example, the URL would be reduced to http://server.com/hg/sub
Fix + test
author | Edouard Gomez <ed.gomez@free.fr> |
---|---|
date | Sat, 01 May 2010 23:05:19 +0200 |
parents | 468876bc3885 |
children | 39e7f14a8286 |
rev | line source |
---|---|
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
1 adding a |
9611
a3d73b3e1f8a
hg.clone: report branch name on update
Adrian Buehlmann <adrian@cadifra.com>
parents:
6338
diff
changeset
|
2 updating to branch default |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
4 % expect ssl error |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
5 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 searching for changes |
10544
2e1a9b811d13
httprepo: normalize output from unbundle with ssh
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
7 remote: ssl required |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
8 % serve errors |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 % expect authorization error |
6335
e29557d687c9
hgweb: only accept POST requests for unbundle
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
10 abort: authorization failed |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
11 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 searching for changes |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
13 % serve errors |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
14 % expect authorization error: must have authorized user |
6335
e29557d687c9
hgweb: only accept POST requests for unbundle
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
15 abort: authorization failed |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
16 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
17 searching for changes |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
18 % serve errors |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
19 % expect success |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
20 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
21 searching for changes |
10544
2e1a9b811d13
httprepo: normalize output from unbundle with ssh
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
22 remote: adding changesets |
2e1a9b811d13
httprepo: normalize output from unbundle with ssh
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
23 remote: adding manifests |
2e1a9b811d13
httprepo: normalize output from unbundle with ssh
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
24 remote: adding file changes |
2e1a9b811d13
httprepo: normalize output from unbundle with ssh
Sune Foldager <cryo@cyanite.org>
parents:
10398
diff
changeset
|
25 remote: added 1 changesets with 1 changes to 1 files |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
26 % serve errors |
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
27 changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http |
10893 | 28 rolling back to revision 1 (undo serve) |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 % expect authorization error: all users denied |
6335
e29557d687c9
hgweb: only accept POST requests for unbundle
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
30 abort: authorization failed |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
31 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
32 searching for changes |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
33 % serve errors |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
34 % expect authorization error: some users denied, users must be authenticated |
6335
e29557d687c9
hgweb: only accept POST requests for unbundle
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6167
diff
changeset
|
35 abort: authorization failed |
10398
ace3cf2bc991
tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents:
9611
diff
changeset
|
36 pushing to http://localhost:$HGPORT/ |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
37 searching for changes |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
38 % serve errors |