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).
--- 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