# HG changeset patch # User Pierre-Yves David # Date 2022-12-13 08:59:22 # Node ID cf8b9c80d67cc1309d669d44c79941973cf00635 # Parent 1f369ca9e34c69c6a2d654672b21cbc16fdb79db 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). diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -3075,6 +3075,9 @@ class localrepository: 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()