# HG changeset patch # User Pierre-Yves David # Date 1633072503 -7200 # Node ID d342815ff827fd890324c1f56bea044ce37817a3 # Parent b2af515b4faf83a8cf690586d64cfe5bbfebbb84 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 diff -r b2af515b4faf -r d342815ff827 mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py Fri Oct 01 09:14:10 2021 +0200 +++ b/mercurial/pure/parsers.py Fri Oct 01 09:15:03 2021 +0200 @@ -156,7 +156,7 @@ if state == b'm': return cls(wc_tracked=True, p1_tracked=True, p2_info=True) elif state == b'a': - return cls.new_added() + return cls(wc_tracked=True) elif state == b'r': if size == NONNORMAL: p1_tracked = True diff -r b2af515b4faf -r d342815ff827 rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 09:14:10 2021 +0200 +++ b/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 09:15:03 2021 +0200 @@ -81,7 +81,11 @@ Self::new_normal(mode, size, mtime) } } - EntryState::Added => Self::new_added(), + EntryState::Added => Self { + flags: Flags::WDIR_TRACKED, + mode_size: None, + mtime: None, + }, EntryState::Removed => Self { flags: if size == SIZE_NON_NORMAL { Flags::P1_TRACKED | Flags::P2_INFO