Patchwork D10989: dirstate-item: use the `state` property in debugpathcomplete

login
register
mail settings
Submitter phabricator
Date July 5, 2021, 9:35 a.m.
Message ID <differential-rev-PHID-DREV-uk4vhrhgftsmvlbvcu4z-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49307/
State Superseded
Headers show

Comments

phabricator - July 5, 2021, 9:35 a.m.
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

Patch

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: