tests/test-permissions.t
author Thomas Arendsen Hein <thomas@intevation.de>
Thu, 16 Jun 2011 22:47:34 +0200
changeset 14650 93731b3efd0d
parent 12640 6cc4b14fb76b
child 15443 a1914d214579
permissions -rw-r--r--
revset: add desc(string) to search in commit messages Like keyword(), but does not search in filenames and users. No grepdesc() or descgrep() added, because it might be bad to introduce grepfoo() versions of too many string searches.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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