##// END OF EJS Templates
revlog: subclass the new `repository.iverifyproblem` Protocol class...
revlog: subclass the new `repository.iverifyproblem` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. We shouldn't have to explicitly subclass, but I'm doing so to test the interplay of regular attributes and the `attrs` class. Also, PyCharm has a nifty feature that puts a jump point in the gutter to navigate back and forth between the base class and subclasses (and override functions and base class functions) when there's an explicit subclassing. Additionally, PyCharm will immediately flag signature mismatches without a 40m pytype run.

File last commit:

r53069:72bc29f0 default
r53365:4ef6dbc2 default
Show More
test-permissions.t
82 lines | 1.2 KiB | text/troff | Tads3Lexer
#require unix-permissions no-root reporevlogstore
#testcases dirstate-v1 dirstate-v2
#if dirstate-v2
$ cat >> $HGRCPATH << EOF
> [format]
> use-dirstate-v2=1
> [storage]
> dirstate-v2.slow-path=allow
> EOF
#endif
$ hg init t
$ cd t
$ echo foo > a
$ hg add a
$ hg commit -m "1"
$ hg verify -q
$ chmod -r .hg/store/data/a.i
$ hg verify -q
abort: $EACCES$: '$TESTTMP/t/.hg/store/data/a.i'
[255]
$ chmod +r .hg/store/data/a.i
$ hg verify -q
$ chmod -w .hg/store/data/a.i
$ echo barber > a
#if rust
$ hg commit -m "2"
abort: abort: when writing $TESTTMP/t/.hg/store/data/a.i: $EACCES$
[50]
#else
$ hg commit -m "2"
trouble committing a!
abort: $EACCES$: '$TESTTMP/t/.hg/store/data/a.i'
[255]
#endif
$ chmod -w .
$ hg diff --nodates
diff -r 2a18120dc1c9 a
--- a/a
+++ b/a
@@ -1,1 +1,1 @@
-foo
+barber
$ chmod +w .
$ chmod +w .hg/store/data/a.i
$ mkdir dir
$ touch dir/a
$ hg status
M a
? dir/a
$ chmod -rx dir
#if no-fsmonitor
(fsmonitor makes "hg status" avoid accessing to "dir")
$ hg status
dir: $EACCES$* (glob)
M a
#endif
Reenable perm to allow deletion:
$ chmod +rx dir
$ cd ..