diff mercurial/pure/parsers.py @ 48099:79bc60ca5946

dirstate-item: introduce a `any_tracked` property This property is True is the file is tracked anywhere, either the working copy, or any of the parent. Differential Revision: https://phab.mercurial-scm.org/D11524
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 29 Sep 2021 14:51:31 +0200
parents 80783e553bd5
children 418611f18fd8
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Wed Sep 29 14:41:19 2021 +0200
+++ b/mercurial/pure/parsers.py	Wed Sep 29 14:51:31 2021 +0200
@@ -314,6 +314,11 @@
         return self._wc_tracked
 
     @property
+    def any_tracked(self):
+        """True is the file is tracked anywhere (wc or parents)"""
+        return self._wc_tracked or self._p1_tracked or self._p2_tracked
+
+    @property
     def added(self):
         """True if the file has been added"""
         return self._wc_tracked and not (self._p1_tracked or self._p2_tracked)