# HG changeset patch # User Pierre-Yves David # Date 1632849346 -7200 # Node ID 870100c0209b02e492a2ae42d970123656d91816 # Parent 2943955304b343717de25e86bebbaca7dff2980e dirstate: drop the merged_removed method It it no longer in use. Differential Revision: https://phab.mercurial-scm.org/D11513 diff -r 2943955304b3 -r 870100c0209b mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c Tue Sep 28 19:12:44 2021 +0200 +++ b/mercurial/cext/parsers.c Tue Sep 28 19:15:46 2021 +0200 @@ -166,14 +166,6 @@ (self->flags & dirstate_flag_merged)); } -static inline bool dirstate_item_c_merged_removed(dirstateItemObject *self) -{ - if (!dirstate_item_c_removed(self)) { - return false; - } - return (self->flags & dirstate_flag_merged); -} - static inline bool dirstate_item_c_from_p2(dirstateItemObject *self) { if (!dirstate_item_c_tracked(self)) { @@ -626,15 +618,6 @@ } }; -static PyObject *dirstate_item_get_merged_removed(dirstateItemObject *self) -{ - if (dirstate_item_c_merged_removed(self)) { - Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } -}; - static PyObject *dirstate_item_get_from_p2(dirstateItemObject *self) { if (dirstate_item_c_from_p2(self)) { @@ -669,8 +652,6 @@ {"state", (getter)dirstate_item_get_state, NULL, "state", NULL}, {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL}, {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, - {"merged_removed", (getter)dirstate_item_get_merged_removed, NULL, - "merged_removed", 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}, diff -r 2943955304b3 -r 870100c0209b mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py Tue Sep 28 19:12:44 2021 +0200 +++ b/mercurial/pure/parsers.py Tue Sep 28 19:15:46 2021 +0200 @@ -352,15 +352,6 @@ """True if the file has been removed""" return not self._wc_tracked and (self._p1_tracked or self._p2_tracked) - @property - def merged_removed(self): - """True if the file has been removed, but was "merged" 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._merged - def v1_state(self): """return a "state" suitable for v1 serialization""" if not (self._p1_tracked or self._p2_tracked or self._wc_tracked): diff -r 2943955304b3 -r 870100c0209b rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs Tue Sep 28 19:12:44 2021 +0200 +++ b/rust/hg-core/src/dirstate/entry.rs Tue Sep 28 19:15:46 2021 +0200 @@ -178,10 +178,6 @@ && !self.flags.contains(Flags::WDIR_TRACKED) } - pub fn merged_removed(&self) -> bool { - self.removed() && self.flags.contains(Flags::MERGED) - } - pub fn from_p2_removed(&self) -> bool { self.removed() && self.flags.contains(Flags::CLEAN_P2) } diff -r 2943955304b3 -r 870100c0209b rust/hg-cpython/src/dirstate/item.rs --- a/rust/hg-cpython/src/dirstate/item.rs Tue Sep 28 19:12:44 2021 +0200 +++ b/rust/hg-cpython/src/dirstate/item.rs Tue Sep 28 19:15:46 2021 +0200 @@ -86,11 +86,6 @@ } @property - def merged_removed(&self) -> PyResult { - Ok(self.entry(py).get().merged_removed()) - } - - @property def from_p2_removed(&self) -> PyResult { Ok(self.entry(py).get().from_p2_removed()) }