sapling/tests/test-fastmanifest-permission.t
Laurent Charignon 1e1c21421b fastmanifest: don't stop when we cannot get the lock
Summary:
Before this patch we were stopping execution when the lock couldn't
be taken. This was problematic when running hg command for someone else's repo
(for example to debug problems). This patch allows us to continue the execution
of the command when that happen, except we won't use fastmanifest.

Test Plan: This is reflected in the test output

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3422458
2016-06-13 15:26:55 -07:00

48 lines
812 B
Perl

Setup
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ export PYTHONPATH
Check diagnosis, debugging information
1) Setup configuration
$ mkcommit() {
> echo "$1" > "$1"
> hg add "$1"
> echo "add $1" > msg
> echo "" >> msg
> hg ci -l msg
> }
2) Set up the repo
$ mkdir cachetesting
$ cd cachetesting
$ hg init
$ cat >> .hg/hgrc << EOF
> [extensions]
> fastmanifest=
> [fastmanifest]
> cachecutoffdays=-1
> randomorder=False
> EOF
$ mkcommit a
$ mkcommit b
$ mkcommit c
$ mkcommit d
$ mkcommit e
$ deauthorize() {
> chmod 100 .hg
> }
$ authorize() {
> chmod 755 .hg
> }
$ deauthorize
$ hg debugcachemanifest -a
warning: not using fastmanifest
(make sure that .hg/store is writeable)
$ authorize
$ hg debugcachemanifest -a