# HG changeset patch # User Pierre-Yves David # Date 1670900114 -3600 # Node ID 3236643066c489f25d227c6540f9d838d61e1cf7 # Parent d1215f90581879a7e5061641613ea13b63c5c06e 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). diff -r d1215f905818 -r 3236643066c4 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