Show More
@@ -567,6 +567,14 b' static PyObject *dirstate_item_get_track' | |||||
567 | Py_RETURN_FALSE; |
|
567 | Py_RETURN_FALSE; | |
568 | } |
|
568 | } | |
569 | }; |
|
569 | }; | |
|
570 | static PyObject *dirstate_item_get_p1_tracked(dirstateItemObject *self) | |||
|
571 | { | |||
|
572 | if (self->flags & dirstate_flag_p1_tracked) { | |||
|
573 | Py_RETURN_TRUE; | |||
|
574 | } else { | |||
|
575 | Py_RETURN_FALSE; | |||
|
576 | } | |||
|
577 | }; | |||
570 |
|
578 | |||
571 | static PyObject *dirstate_item_get_added(dirstateItemObject *self) |
|
579 | static PyObject *dirstate_item_get_added(dirstateItemObject *self) | |
572 | { |
|
580 | { | |
@@ -642,6 +650,8 b' static PyGetSetDef dirstate_item_getset[' | |||||
642 | {"mtime", (getter)dirstate_item_get_mtime, NULL, "mtime", NULL}, |
|
650 | {"mtime", (getter)dirstate_item_get_mtime, NULL, "mtime", NULL}, | |
643 | {"state", (getter)dirstate_item_get_state, NULL, "state", NULL}, |
|
651 | {"state", (getter)dirstate_item_get_state, NULL, "state", NULL}, | |
644 | {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL}, |
|
652 | {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL}, | |
|
653 | {"p1_tracked", (getter)dirstate_item_get_p1_tracked, NULL, "p1_tracked", | |||
|
654 | NULL}, | |||
645 | {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, |
|
655 | {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, | |
646 | {"p2_info", (getter)dirstate_item_get_p2_info, NULL, "p2_info", NULL}, |
|
656 | {"p2_info", (getter)dirstate_item_get_p2_info, NULL, "p2_info", NULL}, | |
647 | {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL}, |
|
657 | {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL}, |
@@ -301,6 +301,11 b' class DirstateItem(object):' | |||||
301 | return True |
|
301 | return True | |
302 |
|
302 | |||
303 | @property |
|
303 | @property | |
|
304 | def p1_tracked(self): | |||
|
305 | """True if the file is tracked in the first parent manifest""" | |||
|
306 | return self._p1_tracked | |||
|
307 | ||||
|
308 | @property | |||
304 | def p2_info(self): |
|
309 | def p2_info(self): | |
305 | """True if the file needed to merge or apply any input from p2 |
|
310 | """True if the file needed to merge or apply any input from p2 | |
306 |
|
311 |
@@ -153,6 +153,10 b' impl DirstateEntry {' | |||||
153 | self.flags.contains(Flags::WDIR_TRACKED) |
|
153 | self.flags.contains(Flags::WDIR_TRACKED) | |
154 | } |
|
154 | } | |
155 |
|
155 | |||
|
156 | pub fn p1_tracked(&self) -> bool { | |||
|
157 | self.flags.contains(Flags::P1_TRACKED) | |||
|
158 | } | |||
|
159 | ||||
156 | fn in_either_parent(&self) -> bool { |
|
160 | fn in_either_parent(&self) -> bool { | |
157 | self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO) |
|
161 | self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO) | |
158 | } |
|
162 | } |
@@ -67,6 +67,11 b' py_class!(pub class DirstateItem |py| {' | |||||
67 | } |
|
67 | } | |
68 |
|
68 | |||
69 | @property |
|
69 | @property | |
|
70 | def p1_tracked(&self) -> PyResult<bool> { | |||
|
71 | Ok(self.entry(py).get().p1_tracked()) | |||
|
72 | } | |||
|
73 | ||||
|
74 | @property | |||
70 | def added(&self) -> PyResult<bool> { |
|
75 | def added(&self) -> PyResult<bool> { | |
71 | Ok(self.entry(py).get().added()) |
|
76 | Ok(self.entry(py).get().added()) | |
72 | } |
|
77 | } |
General Comments 0
You need to be logged in to leave comments.
Login now