comparison mercurial/debugcommands.py @ 50113:dae8dda6f582

debugrebuildstate: wrap the operation in a `changing_parents` context This ismaybe a "changing_files" case? However this would be the only usage of `rebuild` outside a `changing_parents` context and this is a debug command, so lets not make the code base more complex because of that one command.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 20 Feb 2023 14:05:19 +0100
parents 1f28172cfce9
children af776c3d5c3e
comparison
equal deleted inserted replaced
50112:62158471d038 50113:dae8dda6f582
3140 manifestonly = manifestfiles - dirstatefiles 3140 manifestonly = manifestfiles - dirstatefiles
3141 dsonly = dirstatefiles - manifestfiles 3141 dsonly = dirstatefiles - manifestfiles
3142 dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added} 3142 dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added}
3143 changedfiles = manifestonly | dsnotadded 3143 changedfiles = manifestonly | dsnotadded
3144 3144
3145 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles) 3145 with dirstate.changing_parents(repo):
3146 dirstate.write(repo.currenttransaction()) 3146 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3147 3147
3148 3148
3149 @command( 3149 @command(
3150 b'debugrebuildfncache', 3150 b'debugrebuildfncache',
3151 [ 3151 [