# HG changeset patch # User Pierre-Yves David # Date 2021-10-01 01:26:12 # Node ID d71feb05d5b6aaf2a3e77c7d2ad4765785c37a09 # Parent 6ac2b417d5d7698d884947316d129f6db000e344 dirstate-item: drop the `from_p2` property It has no user anymore. Differential Revision: https://phab.mercurial-scm.org/D11594 diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -322,16 +322,6 @@ class DirstateItem(object): return self._wc_tracked and self._p1_tracked and self._p2_info @property - def from_p2(self): - """True if the file have been fetched from p2 during the current merge - - This is only True is the file is currently tracked. - - Should only be set if a merge is in progress in the dirstate - """ - return self._wc_tracked and (not self._p1_tracked) and self._p2_info - - @property def removed(self): """True if the file has been removed""" return not self._wc_tracked and (self._p1_tracked or self._p2_info) 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 @@ -178,11 +178,6 @@ impl DirstateEntry { self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent() } - pub fn from_p2(&self) -> bool { - self.flags.contains(Flags::WDIR_TRACKED | Flags::P2_INFO) - && !self.flags.contains(Flags::P1_TRACKED) - } - pub fn maybe_clean(&self) -> bool { if !self.flags.contains(Flags::WDIR_TRACKED) { false diff --git a/rust/hg-cpython/src/dirstate/item.rs b/rust/hg-cpython/src/dirstate/item.rs --- a/rust/hg-cpython/src/dirstate/item.rs +++ b/rust/hg-cpython/src/dirstate/item.rs @@ -93,11 +93,6 @@ py_class!(pub class DirstateItem |py| { } @property - def from_p2(&self) -> PyResult { - Ok(self.entry(py).get().from_p2()) - } - - @property def maybe_clean(&self) -> PyResult { Ok(self.entry(py).get().maybe_clean()) }