Mercurial > hg
annotate tests/test-permissions.t @ 12415:1ff3fc4b6a66
tests: unify test-diff-color
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Sep 2010 13:41:32 -0500 |
parents | 97ffc68f71d3 |
children | 6cc4b14fb76b |
rev | line source |
---|---|
12279 | 1 $ hg init t |
2 $ cd t | |
3 | |
4 $ echo foo > a | |
5 $ hg add a | |
6 | |
7 $ hg commit -m "1" | |
8 | |
9 $ hg verify | |
10 checking changesets | |
11 checking manifests | |
12 crosschecking files in changesets and manifests | |
13 checking files | |
14 1 files, 1 changesets, 1 total revisions | |
15 | |
16 $ chmod -r .hg/store/data/a.i | |
17 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
18 $ hg verify |
12279 | 19 checking changesets |
20 checking manifests | |
21 crosschecking files in changesets and manifests | |
22 checking files | |
12376
97ffc68f71d3
tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents:
12375
diff
changeset
|
23 abort: Permission denied: * (glob) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
24 [255] |
12279 | 25 |
26 $ chmod +r .hg/store/data/a.i | |
27 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
28 $ hg verify |
12279 | 29 checking changesets |
30 checking manifests | |
31 crosschecking files in changesets and manifests | |
32 checking files | |
33 1 files, 1 changesets, 1 total revisions | |
1497 | 34 |
12279 | 35 $ chmod -w .hg/store/data/a.i |
36 | |
37 $ echo barber > a | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
38 $ hg commit -m "2" |
12279 | 39 trouble committing a! |
12376
97ffc68f71d3
tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents:
12375
diff
changeset
|
40 abort: Permission denied: * (glob) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
41 [255] |
12279 | 42 |
43 $ chmod -w . | |
44 | |
45 $ hg diff --nodates | |
46 diff -r 2a18120dc1c9 a | |
47 --- a/a | |
48 +++ b/a | |
49 @@ -1,1 +1,1 @@ | |
50 -foo | |
51 +barber | |
7099
6f750e76fb46
dirstate.walk: skip unreadable directories (issue1213)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5519
diff
changeset
|
52 |
12279 | 53 $ chmod +w . |
54 | |
55 $ chmod +w .hg/store/data/a.i | |
56 $ mkdir dir | |
57 $ touch dir/a | |
58 $ hg status | |
59 M a | |
60 ? dir/a | |
61 $ chmod -rx dir | |
62 $ hg status | |
63 dir: Permission denied | |
64 M a | |
65 | |
66 Reenable perm to allow deletion: | |
67 | |
68 $ chmod +rx dir | |
69 |