D12618: auto-upgrade: add a test case where the repository is already locked
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri May 6 08:38:31 UTC 2022
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This show the current behavior is the repository to auto-upgrade is already
locked.
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 wants in a later tests.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12618
AFFECTED FILES
tests/test-upgrade-repo.t
CHANGE DETAILS
diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -2076,3 +2076,18 @@
$ chmod -R u+w auto-upgrade
+Attempting Auto-upgrade on a locked repository
+----------------------------------------------
+
+ $ hg -R auto-upgrade debuglock --set-lock --quiet &
+ $ echo $! >> $DAEMON_PIDS
+ $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock
+ $ hg status -R auto-upgrade \
+ > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
+ > --config format.use-dirstate-v2=no
+ abort: repository auto-upgrade: timed out waiting for lock held by 'brunhoff/effffffc:1215708'
+ [20]
+ $ hg debugformat -R auto-upgrade | grep dirstate-v2
+ dirstate-v2: yes
+
+ $ killdaemons.py
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list