Mercurial > hg
comparison mercurial/context.py @ 48095:20d0149b8a0a
dirstate-item: use `tracked` instead of `state` in context.matches
Differential Revision: https://phab.mercurial-scm.org/D11532
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 15:07:21 +0200 |
parents | 3fe500d15e7c |
children | 41f40f35278a |
comparison
equal
deleted
inserted
replaced
48094:3fe500d15e7c | 48095:20d0149b8a0a |
---|---|
2015 ) | 2015 ) |
2016 | 2016 |
2017 def matches(self, match): | 2017 def matches(self, match): |
2018 match = self._repo.narrowmatch(match) | 2018 match = self._repo.narrowmatch(match) |
2019 ds = self._repo.dirstate | 2019 ds = self._repo.dirstate |
2020 return sorted(f for f in ds.matches(match) if ds[f] != b'r') | 2020 return sorted(f for f in ds.matches(match) if ds.get_entry(f).tracked) |
2021 | 2021 |
2022 def markcommitted(self, node): | 2022 def markcommitted(self, node): |
2023 with self._repo.dirstate.parentchange(): | 2023 with self._repo.dirstate.parentchange(): |
2024 for f in self.modified() + self.added(): | 2024 for f in self.modified() + self.added(): |
2025 self._repo.dirstate.update_file( | 2025 self._repo.dirstate.update_file( |