mercurial/cext/parsers.c
changeset 47531 f5b8f0b9c129
parent 47526 8bcae9bf9e8d
child 47532 ccbabaee5c36
--- a/mercurial/cext/parsers.c	Sun Jul 04 01:59:41 2021 +0200
+++ b/mercurial/cext/parsers.c	Sun Jul 04 02:12:54 2021 +0200
@@ -158,6 +158,15 @@
 	return PyBytes_FromStringAndSize(&self->state, 1);
 };
 
+static PyObject *dirstatetuple_get_tracked(dirstateTupleObject *self)
+{
+	if (self->state == 'a' || self->state == 'm' || self->state == 'n') {
+		Py_RETURN_TRUE;
+	} else {
+		Py_RETURN_FALSE;
+	}
+};
+
 static PyObject *dirstatetuple_get_added(dirstateTupleObject *self)
 {
 	if (self->state == 'a') {
@@ -214,6 +223,7 @@
 
 static PyGetSetDef dirstatetuple_getset[] = {
     {"state", (getter)dirstatetuple_get_state, NULL, "state", NULL},
+    {"tracked", (getter)dirstatetuple_get_tracked, NULL, "tracked", NULL},
     {"added", (getter)dirstatetuple_get_added, NULL, "added", NULL},
     {"merged_removed", (getter)dirstatetuple_get_merged_removed, NULL,
      "merged_removed", NULL},