changeset 47929:03f57915e0ce

dirstate-item: implement `added` in a simpler way We can simply use the underlying attribute. Differential Revision: https://phab.mercurial-scm.org/D11366
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 27 Aug 2021 17:07:56 +0200
parents f1033c2d9b66
children 7c37d153c22d
files mercurial/pure/parsers.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Fri Aug 27 17:07:12 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Aug 27 17:07:56 2021 +0200
@@ -268,7 +268,7 @@
     @property
     def added(self):
         """True if the file has been added"""
-        return self.v1_state() == b'a'
+        return self._wc_tracked and not (self._p1_tracked or self._p2_tracked)
 
     @property
     def merged(self):