Mercurial > hg
changeset 48065:870100c0209b
dirstate: drop the merged_removed method
It it no longer in use.
Differential Revision: https://phab.mercurial-scm.org/D11513
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 28 Sep 2021 19:15:46 +0200 |
parents | 2943955304b3 |
children | 7a2de2bd9fcd |
files | mercurial/cext/parsers.c mercurial/pure/parsers.py rust/hg-core/src/dirstate/entry.rs rust/hg-cpython/src/dirstate/item.rs |
diffstat | 4 files changed, 0 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- 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},
--- 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):
--- 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) }
--- 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<bool> { - Ok(self.entry(py).get().merged_removed()) - } - - @property def from_p2_removed(&self) -> PyResult<bool> { Ok(self.entry(py).get().from_p2_removed()) }