dirstate-item: implement `removed` in a simpler way
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 27 Aug 2021 17:12:39 +0200
changeset 47933 774e235d13c3
parent 47932 59eddbaa5bfb
child 47934 f94cc63df859
dirstate-item: implement `removed` in a simpler way We can simply use the underlying attribute. Differential Revision: https://phab.mercurial-scm.org/D11370
mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py	Fri Aug 27 17:10:26 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Aug 27 17:12:39 2021 +0200
@@ -300,7 +300,7 @@
     @property
     def removed(self):
         """True if the file has been removed"""
-        return self.v1_state() == b'r'
+        return not self._wc_tracked and (self._p1_tracked or self._p2_tracked)
 
     @property
     def merged_removed(self):