Patchwork D11532: dirstate-item: use `tracked` instead of `state` in context.matches

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2021, 9:42 a.m.
Message ID <differential-rev-PHID-DREV-rpaurjyobtvmsflqy2c3-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49858/
State Superseded
Headers show

Comments

phabricator - Oct. 1, 2021, 9:42 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11532

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2017,7 +2017,7 @@ 
     def matches(self, match):
         match = self._repo.narrowmatch(match)
         ds = self._repo.dirstate
-        return sorted(f for f in ds.matches(match) if ds[f] != b'r')
+        return sorted(f for f in ds.matches(match) if ds.get_entry(f).tracked)
 
     def markcommitted(self, node):
         with self._repo.dirstate.parentchange():