Mercurial > hg
annotate tests/test-audit-path.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 | e9d3a11eacad |
children |
rev | line source |
---|---|
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 % should fail |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 abort: path contains illegal component: .hg/00changelog.i |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 adding a/a |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 % should fail |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 abort: path 'b/b' traverses symbolic link 'b' |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 % should succeed |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 % should still fail - maybe |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 abort: path 'b/b' traverses symbolic link 'b' |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
9 % unbundle tampered bundle |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
10 adding changesets |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
11 adding manifests |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
12 adding file changes |
7586
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
13 added 5 changesets with 6 changes to 6 files (+4 heads) |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
14 (run 'hg heads' to see heads, 'hg merge' to merge) |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
15 % attack .hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
16 .hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
17 abort: path contains illegal component: .hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
18 % attack foo/.hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
19 foo/.hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
20 abort: path 'foo/.hg/test' is inside repo 'foo' |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
21 % attack back/test where back symlinks to .. |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
22 back |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
23 back/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
24 abort: path 'back/test' traverses symbolic link 'back' |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
25 % attack ../test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
26 ../test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
27 abort: path contains illegal component: ../test |
7586
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
28 % attack /tmp/test |
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
29 /tmp/test |
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
30 abort: No such file or directory: [HGTMP]/test-audit-path/target//tmp/test |