# HG changeset patch # User Pierre-Yves David # Date 2021-09-29 15:52:39 # Node ID 78e66649cdb3010dbc85c3a653ee0280abbccd6c # Parent 571dd808c6c8c29f16b32ff035e4141c4f1b0011 dirstate-item: use `added` in debugrebuilddirstate (instead of `state`) Differential Revision: https://phab.mercurial-scm.org/D11538 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2960,7 +2960,7 @@ def debugrebuilddirstate(ui, repo, rev, dirstatefiles = set(dirstate) manifestonly = manifestfiles - dirstatefiles dsonly = dirstatefiles - manifestfiles - dsnotadded = {f for f in dsonly if dirstate[f] != b'a'} + dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added} changedfiles = manifestonly | dsnotadded dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)