Skip to content
Snippets Groups Projects
Commit 1c233af9 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

auto-upgrade: add a test case with no permission to lock the repository

This show the current behavior when the repository is unlockable.

The current behavior is to abort, which is probably not great. Now that we have
a proper test, we can think about the behavior we want in a later changeset.

Differential Revision: https://phab.mercurial-scm.org/D12615
parent 411d591e
No related branches found
No related tags found
2 merge requests!168branching: merge default into stable,!122Queuing a series from phabricator
...@@ -2061,3 +2061,18 @@ ...@@ -2061,3 +2061,18 @@
tracked-hint: no tracked-hint: no
share-safe: yes share-safe: yes
Attempting Auto-upgrade on a read-only repository
-------------------------------------------------
$ chmod -R a-w auto-upgrade
$ hg status -R auto-upgrade \
> --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
> --config format.use-dirstate-v2=no
abort: could not lock working directory of auto-upgrade: Permission denied
[20]
$ hg debugformat -R auto-upgrade | grep dirstate-v2
dirstate-v2: yes
$ chmod -R u+w auto-upgrade
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment