Mercurial > hg
annotate tests/test-audit-path.t @ 16297:1791d7662d32 stable
tests: eliminate shutdown race and sleeps in test-serve
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 28 Mar 2012 10:29:39 -0500 |
parents | 117f9190c1ba |
children | 4f795f5fbb0b |
rev | line source |
---|---|
15441
e0348815e806
tests: use 'hghave symlink' for tests using symlinks
Mads Kiilerich <mads@kiilerich.com>
parents:
14116
diff
changeset
|
1 $ "$TESTDIR/hghave" symlink || exit 80 |
e0348815e806
tests: use 'hghave symlink' for tests using symlinks
Mads Kiilerich <mads@kiilerich.com>
parents:
14116
diff
changeset
|
2 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
3 $ hg init |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
4 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
5 should fail |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
6 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
7 $ hg add .hg/00changelog.i |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
8 abort: path contains illegal component: .hg/00changelog.i (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
9 [255] |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
11 $ mkdir a |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
12 $ echo a > a/a |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
13 $ hg ci -Ama |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
14 adding a/a |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
15 $ ln -s a b |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
16 $ echo b > a/b |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
18 should fail |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
19 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
20 $ hg add b/b |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
21 abort: path 'b/b' traverses symbolic link 'b' (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
22 [255] |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
23 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
24 should succeed |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
26 $ hg add b |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
27 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
28 should still fail - maybe |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
30 $ hg add b/b |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
31 abort: path 'b/b' traverses symbolic link 'b' (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
32 [255] |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
34 unbundle tampered bundle |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
36 $ hg init target |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
37 $ cd target |
14116
cd3032437064
tests: move test bundles in a bundles/ subdirectory
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13910
diff
changeset
|
38 $ hg unbundle $TESTDIR/bundles/tampered.hg |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
39 adding changesets |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
40 adding manifests |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
41 adding file changes |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
42 added 5 changesets with 6 changes to 6 files (+4 heads) |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
43 (run 'hg heads' to see heads, 'hg merge' to merge) |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
44 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
45 attack .hg/test |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
46 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
47 $ hg manifest -r0 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
48 .hg/test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
49 $ hg update -Cr0 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
50 abort: path contains illegal component: .hg/test |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
51 [255] |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
52 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
53 attack foo/.hg/test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
54 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
55 $ hg manifest -r1 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
56 foo/.hg/test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
57 $ hg update -Cr1 |
13910
93452579df9e
audit: improve nested repo message
Matt Mackall <mpm@selenic.com>
parents:
12640
diff
changeset
|
58 abort: path 'foo/.hg/test' is inside nested repo 'foo' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
59 [255] |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
60 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
61 attack back/test where back symlinks to .. |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
62 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
63 $ hg manifest -r2 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
64 back |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
65 back/test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
66 $ hg update -Cr2 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
67 abort: path 'back/test' traverses symbolic link 'back' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
68 [255] |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
69 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
70 attack ../test |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
71 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
72 $ hg manifest -r3 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
73 ../test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
74 $ hg update -Cr3 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
75 abort: path contains illegal component: ../test |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
76 [255] |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
77 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
78 attack /tmp/test |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
79 |
11855
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
80 $ hg manifest -r4 |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
81 /tmp/test |
054b0d9c3f0c
tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents:
7681
diff
changeset
|
82 $ hg update -Cr4 |
15521
117f9190c1ba
tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
83 abort: *: $TESTTMP/target//tmp/test (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11855
diff
changeset
|
84 [255] |