# HG changeset patch # User Pierre-Yves David # Date 2021-07-05 04:45:32 # Node ID 5363610f61efa024c68e1a39c8399aedaea48cc1 # Parent 20b65f34d704bf87bc04396ae81d984e602fde59 dirstate-item: use the `state` property in debugpathcomplete Ideally we would use narrower property, but this is a good start. Differential Revision: https://phab.mercurial-scm.org/D10989 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2608,7 +2608,7 @@ def debugpathcomplete(ui, repo, *specs, files, dirs = set(), set() adddir, addfile = dirs.add, files.add for f, st in pycompat.iteritems(dirstate): - if f.startswith(spec) and st[0] in acceptable: + if f.startswith(spec) and st.state in acceptable: if fixpaths: f = f.replace(b'/', pycompat.ossep) if fullpaths: