# HG changeset patch # User Pierre-Yves David # Date 2023-02-13 22:33:27 # Node ID 981d2f132935f16f2e3a1c3c29da9c8c535ba170 # Parent 89796af68b2775b917c4ade8cef8b604c7d7784d dirstate: explicitly write the dirstate after `eol` dirstate manipulation I am working on making the dirstate write patterns more predictable. This patch is part of a small series of similar patches that adds a explicit dirstate write in a handful of location where the dirstate is updated "a bit in a strange way". With this explicit write, we are no longer relying on implicite write of the dirstate on `wlock` release. This make the world a better place. diff --git a/hgext/eol.py b/hgext/eol.py --- a/hgext/eol.py +++ b/hgext/eol.py @@ -445,6 +445,7 @@ def reposetup(ui, repo): # Write the cache to update mtime and cache .hgeol with self.vfs(b"eol.cache", b"w") as f: f.write(hgeoldata) + self.dirstate.write(self.currenttransaction()) except errormod.LockUnavailable: # If we cannot lock the repository and clear the # dirstate, then a commit might not see all files