diff -r 852262e2e7d9 -r 265cdfaad372 mercurial/cext/parsers.c --- 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 */ };