diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -174,14 +174,6 @@ return (self->flags & dirstate_flag_clean_p2); } -static inline bool dirstate_item_c_from_p2_removed(dirstateItemObject *self) -{ - if (!dirstate_item_c_removed(self)) { - return false; - } - return (self->flags & dirstate_flag_clean_p2); -} - static inline char dirstate_item_c_v1_state(dirstateItemObject *self) { if (dirstate_item_c_removed(self)) { @@ -628,15 +620,6 @@ } }; -static PyObject *dirstate_item_get_from_p2_removed(dirstateItemObject *self) -{ - if (dirstate_item_c_from_p2_removed(self)) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } -}; - static PyObject *dirstate_item_get_removed(dirstateItemObject *self) { if (dirstate_item_c_removed(self)) { @@ -654,8 +637,6 @@ {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL}, {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL}, - {"from_p2_removed", (getter)dirstate_item_get_from_p2_removed, NULL, - "from_p2_removed", NULL}, {"from_p2", (getter)dirstate_item_get_from_p2, NULL, "from_p2", NULL}, {"removed", (getter)dirstate_item_get_removed, NULL, "removed", NULL}, {NULL} /* Sentinel */ diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -339,15 +339,6 @@ return self._clean_p2 @property - def from_p2_removed(self): - """True if the file has been removed, but was "from_p2" initially - - This property seems like an abstraction leakage and should probably be - dealt in this class (or maybe the dirstatemap) directly. - """ - return self.removed and self._clean_p2 - - @property def removed(self): """True if the file has been removed""" return not self._wc_tracked and (self._p1_tracked or self._p2_tracked) 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,10 +178,6 @@ && !self.flags.contains(Flags::WDIR_TRACKED) } - pub fn from_p2_removed(&self) -> bool { - self.removed() && self.flags.contains(Flags::CLEAN_P2) - } - pub fn merged(&self) -> bool { self.flags.contains(Flags::WDIR_TRACKED | Flags::MERGED) } 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 @@ -86,10 +86,6 @@ } @property - def from_p2_removed(&self) -> PyResult { - Ok(self.entry(py).get().from_p2_removed()) - } - def v1_state(&self) -> PyResult { let (state, _mode, _size, _mtime) = self.entry(py).get().v1_data(); let state_byte: u8 = state.into();