comparison tests/test-permissions.t @ 12279:28e2e3804f2e

combine tests
author Adrian Buehlmann <adrian@cadifra.com>
date Tue, 14 Sep 2010 12:20:51 +0200
parents tests/test-permissions@4c94b6d0fb1c
children 22f3353bcc36
comparison
equal deleted inserted replaced
12278:c4c2ba553401 12279:28e2e3804f2e
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
18 $ hg verify || echo %%% verify failed
19 checking changesets
20 checking manifests
21 crosschecking files in changesets and manifests
22 checking files
23 abort: Permission denied: .*
24 %%% verify failed
25
26 $ chmod +r .hg/store/data/a.i
27
28 $ hg verify || echo %%% verify failed
29 checking changesets
30 checking manifests
31 crosschecking files in changesets and manifests
32 checking files
33 1 files, 1 changesets, 1 total revisions
34
35 $ chmod -w .hg/store/data/a.i
36
37 $ echo barber > a
38 $ hg commit -m "2" || echo %%% commit failed
39 trouble committing a!
40 abort: Permission denied: .*
41 %%% commit failed
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
52
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