Mercurial > hg
annotate tests/test-permissions.t @ 13728:15d1db2abfcb
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 23 Mar 2011 09:20:40 -0500 |
parents | 6cc4b14fb76b |
children | a1914d214579 |
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 | |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
23 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i |
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! |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
40 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i |
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 |