##// END OF EJS Templates
dirstate: drop the merged_removed method...
marmoute -
r48879:870100c0 default
parent child Browse files
Show More
@@ -166,14 +166,6 b' static inline bool dirstate_item_c_merge'
166 (self->flags & dirstate_flag_merged));
166 (self->flags & dirstate_flag_merged));
167 }
167 }
168
168
169 static inline bool dirstate_item_c_merged_removed(dirstateItemObject *self)
170 {
171 if (!dirstate_item_c_removed(self)) {
172 return false;
173 }
174 return (self->flags & dirstate_flag_merged);
175 }
176
177 static inline bool dirstate_item_c_from_p2(dirstateItemObject *self)
169 static inline bool dirstate_item_c_from_p2(dirstateItemObject *self)
178 {
170 {
179 if (!dirstate_item_c_tracked(self)) {
171 if (!dirstate_item_c_tracked(self)) {
@@ -626,15 +618,6 b' static PyObject *dirstate_item_get_merge'
626 }
618 }
627 };
619 };
628
620
629 static PyObject *dirstate_item_get_merged_removed(dirstateItemObject *self)
630 {
631 if (dirstate_item_c_merged_removed(self)) {
632 Py_RETURN_TRUE;
633 } else {
634 Py_RETURN_FALSE;
635 }
636 };
637
638 static PyObject *dirstate_item_get_from_p2(dirstateItemObject *self)
621 static PyObject *dirstate_item_get_from_p2(dirstateItemObject *self)
639 {
622 {
640 if (dirstate_item_c_from_p2(self)) {
623 if (dirstate_item_c_from_p2(self)) {
@@ -669,8 +652,6 b' static PyGetSetDef dirstate_item_getset['
669 {"state", (getter)dirstate_item_get_state, NULL, "state", NULL},
652 {"state", (getter)dirstate_item_get_state, NULL, "state", NULL},
670 {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL},
653 {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL},
671 {"added", (getter)dirstate_item_get_added, NULL, "added", NULL},
654 {"added", (getter)dirstate_item_get_added, NULL, "added", NULL},
672 {"merged_removed", (getter)dirstate_item_get_merged_removed, NULL,
673 "merged_removed", NULL},
674 {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL},
655 {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL},
675 {"from_p2_removed", (getter)dirstate_item_get_from_p2_removed, NULL,
656 {"from_p2_removed", (getter)dirstate_item_get_from_p2_removed, NULL,
676 "from_p2_removed", NULL},
657 "from_p2_removed", NULL},
@@ -352,15 +352,6 b' class DirstateItem(object):'
352 """True if the file has been removed"""
352 """True if the file has been removed"""
353 return not self._wc_tracked and (self._p1_tracked or self._p2_tracked)
353 return not self._wc_tracked and (self._p1_tracked or self._p2_tracked)
354
354
355 @property
356 def merged_removed(self):
357 """True if the file has been removed, but was "merged" initially
358
359 This property seems like an abstraction leakage and should probably be
360 dealt in this class (or maybe the dirstatemap) directly.
361 """
362 return self.removed and self._merged
363
364 def v1_state(self):
355 def v1_state(self):
365 """return a "state" suitable for v1 serialization"""
356 """return a "state" suitable for v1 serialization"""
366 if not (self._p1_tracked or self._p2_tracked or self._wc_tracked):
357 if not (self._p1_tracked or self._p2_tracked or self._wc_tracked):
@@ -178,10 +178,6 b' impl DirstateEntry {'
178 && !self.flags.contains(Flags::WDIR_TRACKED)
178 && !self.flags.contains(Flags::WDIR_TRACKED)
179 }
179 }
180
180
181 pub fn merged_removed(&self) -> bool {
182 self.removed() && self.flags.contains(Flags::MERGED)
183 }
184
185 pub fn from_p2_removed(&self) -> bool {
181 pub fn from_p2_removed(&self) -> bool {
186 self.removed() && self.flags.contains(Flags::CLEAN_P2)
182 self.removed() && self.flags.contains(Flags::CLEAN_P2)
187 }
183 }
@@ -86,11 +86,6 b' py_class!(pub class DirstateItem |py| {'
86 }
86 }
87
87
88 @property
88 @property
89 def merged_removed(&self) -> PyResult<bool> {
90 Ok(self.entry(py).get().merged_removed())
91 }
92
93 @property
94 def from_p2_removed(&self) -> PyResult<bool> {
89 def from_p2_removed(&self) -> PyResult<bool> {
95 Ok(self.entry(py).get().from_p2_removed())
90 Ok(self.entry(py).get().from_p2_removed())
96 }
91 }
General Comments 0
You need to be logged in to leave comments. Login now