dirstate: issue a developer warning on implicit write on wlock release
Our goal is to get rid of all these to clarify the writing pattern, so it is
time to warn about this (and later, forbid it).
--- a/mercurial/localrepo.py Wed Feb 15 23:29:04 2023 +0100
+++ b/mercurial/localrepo.py Tue Dec 13 09:59:22 2022 +0100
@@ -3075,6 +3075,9 @@
self.ui.develwarn(msg)
self.dirstate.invalidate()
else:
+ if self.dirstate._dirty:
+ msg = b"dirty dirstate on wlock release"
+ self.ui.develwarn(msg)
self.dirstate.write(None)
self._filecache[b'dirstate'].refresh()