Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 48113:78e66649cdb3
dirstate-item: use `added` in debugrebuilddirstate
(instead of `state`)
Differential Revision: https://phab.mercurial-scm.org/D11538
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 17:52:39 +0200 |
parents | c87844960a35 |
children | 5ced12cfa41b |
comparison
equal
deleted
inserted
replaced
48112:571dd808c6c8 | 48113:78e66649cdb3 |
---|---|
2958 if opts.get('minimal'): | 2958 if opts.get('minimal'): |
2959 manifestfiles = set(ctx.manifest().keys()) | 2959 manifestfiles = set(ctx.manifest().keys()) |
2960 dirstatefiles = set(dirstate) | 2960 dirstatefiles = set(dirstate) |
2961 manifestonly = manifestfiles - dirstatefiles | 2961 manifestonly = manifestfiles - dirstatefiles |
2962 dsonly = dirstatefiles - manifestfiles | 2962 dsonly = dirstatefiles - manifestfiles |
2963 dsnotadded = {f for f in dsonly if dirstate[f] != b'a'} | 2963 dsnotadded = {f for f in dsonly if not dirstate.get_entry(f).added} |
2964 changedfiles = manifestonly | dsnotadded | 2964 changedfiles = manifestonly | dsnotadded |
2965 | 2965 |
2966 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles) | 2966 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles) |
2967 | 2967 |
2968 | 2968 |