From patchwork Mon Jul 5 09:35:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10989: dirstate-item: use the `state` property in debugpathcomplete From: phabricator X-Patchwork-Id: 49307 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 5 Jul 2021 09:35:54 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Ideally we would use narrower property, but this is a good start. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10989 AFFECTED FILES mercurial/debugcommands.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2614,7 +2614,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: