# HG changeset patch # User Raphaël Gomès # Date 1651484543 -7200 # Node ID 8f200511cdc7abf8e00f0372ea765d4b311ff6db # Parent 3eac92509484f252465ec23d59b1d72f000336b0 dirstate: stop using `entry.state()` for logic in `verify` Use the new API instead of the deprecated one. The next changeset will remove the use of `state` in this method altogether (currently still in the messages) diff -r 3eac92509484 -r 8f200511cdc7 mercurial/dirstate.py --- a/mercurial/dirstate.py Mon May 02 11:40:33 2022 +0200 +++ b/mercurial/dirstate.py Mon May 02 11:42:23 2022 +0200 @@ -1548,13 +1548,14 @@ missing_from_ds = b"%s in manifest1, but listed as state %s\n" for f, entry in self.items(): state = entry.state - if state in b"nr" and f not in m1: - yield (missing_from_p1, f, state) - if state in b"a" and f in m1: + if entry.p1_tracked: + if entry.modified and f not in m1 and f not in m2: + yield (missing_from_ps, f, state) + elif f not in m1: + yield (missing_from_p1, f, state) + if entry.added and f in m1: yield (unexpected_in_p1, f, state) - if state in b"m" and f not in m1 and f not in m2: - yield (missing_from_ps, f, state) for f in m1: - state = self.get_entry(f).state - if state not in b"nrm": - yield (missing_from_ds, f, state) + entry = self.get_entry(f) + if not entry.p1_tracked: + yield (missing_from_ds, f, entry.state)