diff -r 20b65f34d704 -r 5363610f61ef mercurial/debugcommands.py --- a/mercurial/debugcommands.py Mon Jul 05 06:24:51 2021 +0200 +++ b/mercurial/debugcommands.py Mon Jul 05 06:45:32 2021 +0200 @@ -2608,7 +2608,7 @@ 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: