annotate tests/test-audit-path.t @ 14200:dc733eec9169

test-treediscovery: fix escaping for both dash and bash A '\n' on the command line is turned into a newline by dash, but kept as-is by bash, which resulted in a syntax error in the config file. Luckily, dash wont turn '\n' into a newline when it is part of a here-doc, so we can write the config file using that technique.
author Martin Geisler <mg@lazybytes.net>
date Thu, 05 May 2011 19:29:02 +0200
parents cd3032437064
children e0348815e806
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
1 $ hg init
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
2
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
3 should fail
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 $ hg add .hg/00changelog.i
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
6 abort: path contains illegal component: .hg/00changelog.i
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11855
diff changeset
7 [255]
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
9 $ mkdir a
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
10 $ echo a > a/a
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
11 $ hg ci -Ama
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
12 adding a/a
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
13 $ ln -s a b
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
14 $ echo b > a/b
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
16 should fail
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
17
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
18 $ hg add b/b
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
19 abort: path 'b/b' traverses symbolic link 'b'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11855
diff changeset
20 [255]
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
21
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
22 should succeed
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
24 $ hg add b
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
25
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
26 should still fail - maybe
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
27
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
28 $ hg add b/b
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
29 abort: path 'b/b' traverses symbolic link 'b'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11855
diff changeset
30 [255]
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
31
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
32 unbundle tampered bundle
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 $ hg init target
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
35 $ cd target
14116
cd3032437064 tests: move test bundles in a bundles/ subdirectory
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13910
diff changeset
36 $ hg unbundle $TESTDIR/bundles/tampered.hg
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
37 adding changesets
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
38 adding manifests
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
39 adding file changes
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
40 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
41 (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
42
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
43 attack .hg/test
7554
11a4eb81fb4f test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 5158
diff changeset
44
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
45 $ hg manifest -r0
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
46 .hg/test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
47 $ hg update -Cr0
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
48 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
49 [255]
7554
11a4eb81fb4f test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 5158
diff changeset
50
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
51 attack foo/.hg/test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
52
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
53 $ hg manifest -r1
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
54 foo/.hg/test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
55 $ hg update -Cr1
13910
93452579df9e audit: improve nested repo message
Matt Mackall <mpm@selenic.com>
parents: 12640
diff changeset
56 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
57 [255]
7554
11a4eb81fb4f test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 5158
diff changeset
58
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
59 attack back/test where back symlinks to ..
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
60
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
61 $ hg manifest -r2
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
62 back
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
63 back/test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
64 $ hg update -Cr2
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
65 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
66 [255]
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
67
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
68 attack ../test
7554
11a4eb81fb4f test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 5158
diff changeset
69
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
70 $ hg manifest -r3
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
71 ../test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
72 $ hg update -Cr3
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
73 abort: path contains illegal component: ../test
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11855
diff changeset
74 [255]
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
75
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
76 attack /tmp/test
7554
11a4eb81fb4f test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 5158
diff changeset
77
11855
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
78 $ hg manifest -r4
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
79 /tmp/test
054b0d9c3f0c tests: unify test-audit-path
Martin Geisler <mg@lazybytes.net>
parents: 7681
diff changeset
80 $ hg update -Cr4
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12587
diff changeset
81 abort: No such file or directory: $TESTTMP/target//tmp/test
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11855
diff changeset
82 [255]