dirstate-item: implement `from_p2_removed` in a simpler way
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 27 Aug 2021 17:10:26 +0200
changeset 47932 59eddbaa5bfb
parent 47931 7033d1d5bd18
child 47933 774e235d13c3
dirstate-item: implement `from_p2_removed` in a simpler way We can simply use the underlying attribute. Differential Revision: https://phab.mercurial-scm.org/D11369
mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py	Fri Aug 27 17:09:49 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Aug 27 17:10:26 2021 +0200
@@ -295,7 +295,7 @@
         This property seems like an abstraction leakage and should probably be
         dealt in this class (or maybe the dirstatemap) directly.
         """
-        return self.v1_state() == b'r' and self.v1_size() == FROM_P2
+        return self.removed and self._clean_p2
 
     @property
     def removed(self):