Show More
@@ -567,6 +567,14 b' static PyObject *dirstate_item_get_track' | |||
|
567 | 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 | 579 | static PyObject *dirstate_item_get_added(dirstateItemObject *self) |
|
572 | 580 | { |
@@ -642,6 +650,8 b' static PyGetSetDef dirstate_item_getset[' | |||
|
642 | 650 | {"mtime", (getter)dirstate_item_get_mtime, NULL, "mtime", NULL}, |
|
643 | 651 | {"state", (getter)dirstate_item_get_state, NULL, "state", NULL}, |
|
644 | 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 | 655 | {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, |
|
646 | 656 | {"p2_info", (getter)dirstate_item_get_p2_info, NULL, "p2_info", NULL}, |
|
647 | 657 | {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL}, |
@@ -301,6 +301,11 b' class DirstateItem(object):' | |||
|
301 | 301 | return True |
|
302 | 302 | |
|
303 | 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 | 309 | def p2_info(self): |
|
305 | 310 | """True if the file needed to merge or apply any input from p2 |
|
306 | 311 |
@@ -153,6 +153,10 b' impl DirstateEntry {' | |||
|
153 | 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 | 160 | fn in_either_parent(&self) -> bool { |
|
157 | 161 | self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO) |
|
158 | 162 | } |
General Comments 0
You need to be logged in to leave comments.
Login now