annotate tests/test-permissions.t @ 14751:712954a67be3 stable

cmdserver: assign repo.baseui before running commands There are places in the code that use localrepository.baseui (see hg.remoteui), we need the ui descriptors (and possibly other things) to be set correctly on it, so output written to the remoteui descriptors ends up at the right place. Before this change, tests such as 'test-bookmarks-pushpull.t' didn't work.
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:17 +0300
parents 6cc4b14fb76b
children a1914d214579
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
1 $ hg init t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
2 $ cd t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
4 $ echo foo > a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
5 $ hg add a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
6
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
7 $ hg commit -m "1"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
8
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
9 $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
10 checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
11 checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
12 crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
13 checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
14 1 files, 1 changesets, 1 total revisions
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
15
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
16 $ chmod -r .hg/store/data/a.i
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
17
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
18 $ hg verify
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
19 checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
20 checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
21 crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
25
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
26 $ chmod +r .hg/store/data/a.i
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
27
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
28 $ hg verify
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
29 checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
30 checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
31 crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
32 checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
33 1 files, 1 changesets, 1 total revisions
1497
f0b13c019b04 Add permissions handling test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
34
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
35 $ chmod -w .hg/store/data/a.i
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
36
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
42
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
43 $ chmod -w .
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
44
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
45 $ hg diff --nodates
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
46 diff -r 2a18120dc1c9 a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
47 --- a/a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
48 +++ b/a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
49 @@ -1,1 +1,1 @@
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
50 -foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
51 +barber
7099
6f750e76fb46 dirstate.walk: skip unreadable directories (issue1213)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5519
diff changeset
52
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
53 $ chmod +w .
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
54
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
55 $ chmod +w .hg/store/data/a.i
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
56 $ mkdir dir
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
57 $ touch dir/a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
58 $ hg status
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
59 M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
60 ? dir/a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
61 $ chmod -rx dir
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
62 $ hg status
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
63 dir: Permission denied
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
64 M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
65
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
66 Reenable perm to allow deletion:
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
67
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
68 $ chmod +rx dir
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
69