mirror of
https://github.com/facebook/sapling.git
synced 2024-10-16 19:57:18 +03:00
b27a46c987
Summary: This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly these fixes have to do with correct importing of the actual extensions. Depends on D6675329 Test Plan: - ./run-tests.py fails less after this commit - see further commits for more test fixes Reviewers: #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D6675344
35 lines
898 B
Perl
35 lines
898 B
Perl
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> ownercheck=
|
|
> EOF
|
|
|
|
ownercheck does not prevent normal hg operations
|
|
|
|
$ hg init repo1
|
|
|
|
make os.getuid return a different, fake uid
|
|
|
|
$ cat >> fakeuid.py << EOF
|
|
> import os
|
|
> _getuid = os.getuid
|
|
> def fakeuid(): return _getuid() + 1
|
|
> os.getuid = fakeuid
|
|
> EOF
|
|
|
|
ownercheck prevents wrong user from creating new repos
|
|
|
|
$ hg --config extensions.fakeuid=fakeuid.py init repo2
|
|
abort: $TESTTMP is owned by *, not you * (glob)
|
|
you are likely doing something wrong.
|
|
(you can skip the check using --config extensions.ownercheck=!)
|
|
[255]
|
|
|
|
ownercheck prevents wrong user from accessing existing repos
|
|
|
|
$ hg --config extensions.fakeuid=fakeuid.py log --repo repo1
|
|
abort: $TESTTMP/repo1 is owned by *, not you * (glob)
|
|
you are likely doing something wrong.
|
|
(you can skip the check using --config extensions.ownercheck=!)
|
|
[255]
|
|
|