comparison mercurial/pure/parsers.py @ 48156:d342815ff827

dirstate-item: replace call to new_added The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11600
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 09:15:03 +0200
parents b2af515b4faf
children b45c4dc65adc
comparison
equal deleted inserted replaced
48155:b2af515b4faf 48156:d342815ff827
154 is not expected to change, unlike the __init__ one. 154 is not expected to change, unlike the __init__ one.
155 """ 155 """
156 if state == b'm': 156 if state == b'm':
157 return cls(wc_tracked=True, p1_tracked=True, p2_info=True) 157 return cls(wc_tracked=True, p1_tracked=True, p2_info=True)
158 elif state == b'a': 158 elif state == b'a':
159 return cls.new_added() 159 return cls(wc_tracked=True)
160 elif state == b'r': 160 elif state == b'r':
161 if size == NONNORMAL: 161 if size == NONNORMAL:
162 p1_tracked = True 162 p1_tracked = True
163 p2_info = True 163 p2_info = True
164 elif size == FROM_P2: 164 elif size == FROM_P2: