# HG changeset patch # User Pierre-Yves David # Date 2021-08-27 15:07:56 # Node ID 03f57915e0ce28c81525af5b108200bab697bf77 # Parent f1033c2d9b668c7e9db4cfb1fd9d5cb996e63e5f dirstate-item: implement `added` in a simpler way We can simply use the underlying attribute. Differential Revision: https://phab.mercurial-scm.org/D11366 diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -268,7 +268,7 @@ class DirstateItem(object): @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):