comparison mercurial/debugcommands.py @ 50055:637d46c5b1fa

dirstate: explicitly write the dirstate after `debugrebuilddirstate` 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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Feb 2023 22:26:23 +0100
parents 8f76a41ee465
children 1f28172cfce9
comparison
equal deleted inserted replaced
50054:44528f4a4d53 50055:637d46c5b1fa
3138 dsonly = dirstatefiles - manifestfiles 3138 dsonly = dirstatefiles - manifestfiles
3139 dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added} 3139 dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added}
3140 changedfiles = manifestonly | dsnotadded 3140 changedfiles = manifestonly | dsnotadded
3141 3141
3142 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles) 3142 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3143 dirstate.write(repo.currenttransaction())
3143 3144
3144 3145
3145 @command( 3146 @command(
3146 b'debugrebuildfncache', 3147 b'debugrebuildfncache',
3147 [ 3148 [