Mercurial > public > mercurial-scm > hg
diff mercurial/cext/parsers.c @ 47686:e43128ee436f
dirstate-item: introduce a `dm_otherparent` property
See inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11124
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Jul 2021 22:06:13 +0200 |
parents | 265cdfaad372 |
children | 3853e6ee160d |
line wrap: on
line diff
--- a/mercurial/cext/parsers.c Wed Jul 14 21:59:18 2021 +0200 +++ b/mercurial/cext/parsers.c Wed Jul 14 22:06:13 2021 +0200 @@ -150,6 +150,14 @@ Py_RETURN_FALSE; } }; +static PyObject *dm_otherparent(dirstateItemObject *self) +{ + if (self->size == dirstate_v1_from_p2) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } +}; static PyObject *dirstate_item_need_delay(dirstateItemObject *self, PyObject *value) @@ -232,6 +240,8 @@ 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"}, + {"dm_otherparent", (PyCFunction)dm_otherparent, METH_NOARGS, + "True is the entry is `otherparent` in the dirstatemap sense"}, {NULL} /* Sentinel */ };