mercurial/cext/parsers.c
changeset 48159 252d2f3f0d17
parent 48157 b45c4dc65adc
child 48161 20e41b367953
--- a/mercurial/cext/parsers.c	Fri Oct 01 09:21:52 2021 +0200
+++ b/mercurial/cext/parsers.c	Fri Oct 01 09:23:28 2021 +0200
@@ -347,25 +347,6 @@
 	return (PyObject *)dirstate_item_from_v1_data(state, mode, size, mtime);
 };
 
-/* constructor to help legacy API to build a new "from_p2" item
-
-Should eventually be removed */
-static PyObject *dirstate_item_new_from_p2(PyTypeObject *subtype)
-{
-	/* We do all the initialization here and not a tp_init function because
-	 * dirstate_item is immutable. */
-	dirstateItemObject *t;
-	t = (dirstateItemObject *)subtype->tp_alloc(subtype, 1);
-	if (!t) {
-		return NULL;
-	}
-	t->flags = dirstate_flag_wc_tracked | dirstate_flag_p2_info;
-	t->mode = 0;
-	t->size = 0;
-	t->mtime = 0;
-	return (PyObject *)t;
-};
-
 /* constructor to help legacy API to build a new "possibly" item
 
 Should eventually be removed */
@@ -475,9 +456,6 @@
      "True if the stored mtime would be ambiguous with the current time"},
     {"from_v1_data", (PyCFunction)dirstate_item_from_v1_meth,
      METH_VARARGS | METH_CLASS, "build a new DirstateItem object from V1 data"},
-    {"new_from_p2", (PyCFunction)dirstate_item_new_from_p2,
-     METH_NOARGS | METH_CLASS,
-     "constructor to help legacy API to build a new \"from_p2\" item"},
     {"new_possibly_dirty", (PyCFunction)dirstate_item_new_possibly_dirty,
      METH_NOARGS | METH_CLASS,
      "constructor to help legacy API to build a new \"possibly_dirty\" item"},