dirstate: warn if we write to the dirstate without holding the wlock
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 13 Dec 2022 03:55:14 +0100
changeset 50059 3236643066c4
parent 50058 d1215f905818
child 50060 4f758b51bf9b
dirstate: warn if we write to the dirstate without holding the wlock Writing the dirstate without holding the wlock can race with other update and overwrite important change. The comment questionning the current state of things was right, we should the `wlock` should always cover the dirstate. (Yes, this is me, agreeing with myself, half a decade later).
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Wed Feb 15 21:31:37 2023 +0100
+++ b/mercurial/localrepo.py	Tue Dec 13 03:55:14 2022 +0100
@@ -1323,8 +1323,6 @@
         # XXX cache is a complicatged business someone
         # should investigate this in depth at some point
         b'cache/',
-        # XXX shouldn't be dirstate covered by the wlock?
-        b'dirstate',
         # XXX bisect was still a bit too messy at the time
         # this changeset was introduced. Someone should fix
         # the remainig bit and drop this line