Mercurial > hg
annotate tests/test-permissions.t @ 14732:e9ed3506f066 stable
backout of d04ba50e104d: allow to qpop/push with a dirty working copy
The new behavior was breaking existing tools that relied on a sequence such as
this:
1) start with a dirty working copy
2) qimport some patch
3) try to qpush it
4) old behavior would fail at this point due to outstanding changes.
(new behavior would only fail if the outstanding changes and the patches
changes intersect)
5) innocent user qrefreshes, gets his local changes in the imported patch
It's worth considering if we can move this behavior to -f in the future.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 24 Jun 2011 23:25:42 +0300 |
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 |