comparison tests/test-upgrade-repo.t @ 49196:1c233af99316

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 05 Apr 2022 03:36:31 +0200
parents 411d591e0a27
children 575f3dedb69a
comparison
equal deleted inserted replaced
49195:411d591e0a27 49196:1c233af99316
2059 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' 2059 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2060 dirstate-v2: yes 2060 dirstate-v2: yes
2061 tracked-hint: no 2061 tracked-hint: no
2062 share-safe: yes 2062 share-safe: yes
2063 2063
2064 Attempting Auto-upgrade on a read-only repository
2065 -------------------------------------------------
2066
2067 $ chmod -R a-w auto-upgrade
2068
2069 $ hg status -R auto-upgrade \
2070 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2071 > --config format.use-dirstate-v2=no
2072 abort: could not lock working directory of auto-upgrade: Permission denied
2073 [20]
2074 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2075 dirstate-v2: yes
2076
2077 $ chmod -R u+w auto-upgrade
2078