Patchwork D11530: dirstate-item: use `tracked` instead of the `state` in context

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

Comments

phabricator - Oct. 1, 2021, 9:40 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/D11530

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
@@ -1555,7 +1555,7 @@ 
                 yield f
 
     def __contains__(self, key):
-        return self._repo.dirstate[key] not in b"?r"
+        return self._repo.dirstate.get_entry(key).tracked
 
     def hex(self):
         return self._repo.nodeconstants.wdirhex