# HG changeset patch # User Pierre-Yves David # Date 2021-10-01 07:29:32 # Node ID d0081dbca4424c0df4a578cbd82808c1450130c9 # Parent 79ebbe19d9e3271ff2dc4782373936ee16f3978a dirstate-item: replace call to new_normal The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11607 diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -157,7 +157,11 @@ class DirstateItem(object): parentfiledata=(mode, size, 42), ) else: - return cls.new_normal(mode, size, mtime) + return cls( + wc_tracked=True, + p1_tracked=True, + parentfiledata=(mode, size, mtime), + ) else: raise RuntimeError(b'unknown state: %s' % state) diff --git a/rust/hg-core/src/dirstate/entry.rs b/rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs +++ b/rust/hg-core/src/dirstate/entry.rs @@ -87,7 +87,11 @@ impl DirstateEntry { mtime: None, } } else { - Self::new_normal(mode, size, mtime) + Self { + flags: Flags::WDIR_TRACKED | Flags::P1_TRACKED, + mode_size: Some((mode, size)), + mtime: Some(mtime), + } } } EntryState::Added => Self {