dirstate: explicitly write the dirstate after mq dirstate rebuild
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 13 Feb 2023 23:49:52 +0100
changeset 49996 89796af68b27
parent 49995 27fd12eca557
child 49997 981d2f132935
dirstate: explicitly write the dirstate after mq dirstate rebuild 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.
hgext/mq.py
--- a/hgext/mq.py	Tue Feb 14 20:09:39 2023 +0100
+++ b/hgext/mq.py	Mon Feb 13 23:49:52 2023 +0100
@@ -2126,6 +2126,7 @@
             except:  # re-raises
                 ctx = repo[cparents[0]]
                 repo.dirstate.rebuild(ctx.node(), ctx.manifest())
+                repo.dirstate.write(repo.currenttransaction())
                 self.savedirty()
                 self.ui.warn(
                     _(