diff -r 2f2682f40ea0 -r c84844cd523a mercurial/debugcommands.py --- a/mercurial/debugcommands.py Mon May 02 17:47:38 2022 +0200 +++ b/mercurial/debugcommands.py Mon May 02 11:27:20 2022 +0200 @@ -87,6 +87,7 @@ upgrade, url as urlmod, util, + verify, vfs as vfsmod, wireprotoframing, wireprotoserver, @@ -554,15 +555,9 @@ @command(b'debugcheckstate', [], b'') def debugcheckstate(ui, repo): """validate the correctness of the current dirstate""" - parent1, parent2 = repo.dirstate.parents() - m1 = repo[parent1].manifest() - m2 = repo[parent2].manifest() - errors = 0 - for err in repo.dirstate.verify(m1, m2): - ui.warn(err) - errors += 1 + errors = verify.verifier(repo)._verify_dirstate() if errors: - errstr = _(b".hg/dirstate inconsistent with current parent's manifest") + errstr = _(b"dirstate inconsistent with current parent's manifest") raise error.Abort(errstr)