mercurial/cext/parsers.c
changeset 47685 265cdfaad372
parent 47666 e53256a9f9c5
child 47686 e43128ee436f
--- a/mercurial/cext/parsers.c	Fri Jul 16 16:19:31 2021 +0200
+++ b/mercurial/cext/parsers.c	Wed Jul 14 21:59:18 2021 +0200
@@ -142,6 +142,15 @@
 	return PyInt_FromLong(self->mtime);
 };
 
+static PyObject *dm_nonnormal(dirstateItemObject *self)
+{
+	if (self->state != 'n' || self->mtime == ambiguous_time) {
+		Py_RETURN_TRUE;
+	} else {
+		Py_RETURN_FALSE;
+	}
+};
+
 static PyObject *dirstate_item_need_delay(dirstateItemObject *self,
                                           PyObject *value)
 {
@@ -221,6 +230,8 @@
      "build a new DirstateItem object from V1 data"},
     {"set_possibly_dirty", (PyCFunction)dirstate_item_set_possibly_dirty,
      METH_NOARGS, "mark a file as \"possibly dirty\""},
+    {"dm_nonnormal", (PyCFunction)dm_nonnormal, METH_NOARGS,
+     "True is the entry is non-normal in the dirstatemap sense"},
     {NULL} /* Sentinel */
 };