[Updated] D11316: dirstate-item: fix Cext declaration of dm_nonnormal and dm_otherparent
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Aug 27 12:37:48 UTC 2021
Closed by commit rHG37bffc450897: dirstate-item: fix Cext declaration of dm_nonnormal and dm_otherparent (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11316?vs=30042&id=30084
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11316/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11316
AFFECTED FILES
mercurial/cext/parsers.c
CHANGE DETAILS
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -142,23 +142,6 @@
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 *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)
{
@@ -255,10 +238,6 @@
METH_NOARGS, "mark a file as \"possibly dirty\""},
{"set_untracked", (PyCFunction)dirstate_item_set_untracked, METH_NOARGS,
"mark a file as \"untracked\""},
- {"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 */
};
@@ -345,6 +324,23 @@
}
};
+static PyObject *dm_nonnormal(dirstateItemObject *self)
+{
+ if (self->state != 'n' || self->mtime == ambiguous_time) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+};
+static PyObject *dm_otherparent(dirstateItemObject *self)
+{
+ if (self->size == dirstate_v1_from_p2) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+};
+
static PyGetSetDef dirstate_item_getset[] = {
{"mode", (getter)dirstate_item_get_mode, NULL, "mode", NULL},
{"size", (getter)dirstate_item_get_size, NULL, "size", NULL},
@@ -359,6 +355,8 @@
"from_p2_removed", NULL},
{"from_p2", (getter)dirstate_item_get_from_p2, NULL, "from_p2", NULL},
{"removed", (getter)dirstate_item_get_removed, NULL, "removed", NULL},
+ {"dm_nonnormal", (getter)dm_nonnormal, NULL, "dm_nonnormal", NULL},
+ {"dm_otherparent", (getter)dm_otherparent, NULL, "dm_otherparent", NULL},
{NULL} /* Sentinel */
};
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210827/0ff5d4eb/attachment-0002.html>
More information about the Mercurial-patches
mailing list