Show More
@@ -347,25 +347,6 b' static PyObject *dirstate_item_from_v1_m' | |||
|
347 | 347 | return (PyObject *)dirstate_item_from_v1_data(state, mode, size, mtime); |
|
348 | 348 | }; |
|
349 | 349 | |
|
350 | /* constructor to help legacy API to build a new "possibly" item | |
|
351 | ||
|
352 | Should eventually be removed */ | |
|
353 | static PyObject *dirstate_item_new_possibly_dirty(PyTypeObject *subtype) | |
|
354 | { | |
|
355 | /* We do all the initialization here and not a tp_init function because | |
|
356 | * dirstate_item is immutable. */ | |
|
357 | dirstateItemObject *t; | |
|
358 | t = (dirstateItemObject *)subtype->tp_alloc(subtype, 1); | |
|
359 | if (!t) { | |
|
360 | return NULL; | |
|
361 | } | |
|
362 | t->flags = dirstate_flag_wc_tracked | dirstate_flag_p1_tracked; | |
|
363 | t->mode = 0; | |
|
364 | t->size = 0; | |
|
365 | t->mtime = 0; | |
|
366 | return (PyObject *)t; | |
|
367 | }; | |
|
368 | ||
|
369 | 350 | /* constructor to help legacy API to build a new "normal" item |
|
370 | 351 | |
|
371 | 352 | Should eventually be removed */ |
@@ -456,9 +437,6 b' static PyMethodDef dirstate_item_methods' | |||
|
456 | 437 | "True if the stored mtime would be ambiguous with the current time"}, |
|
457 | 438 | {"from_v1_data", (PyCFunction)dirstate_item_from_v1_meth, |
|
458 | 439 | METH_VARARGS | METH_CLASS, "build a new DirstateItem object from V1 data"}, |
|
459 | {"new_possibly_dirty", (PyCFunction)dirstate_item_new_possibly_dirty, | |
|
460 | METH_NOARGS | METH_CLASS, | |
|
461 | "constructor to help legacy API to build a new \"possibly_dirty\" item"}, | |
|
462 | 440 | {"new_normal", (PyCFunction)dirstate_item_new_normal, |
|
463 | 441 | METH_VARARGS | METH_CLASS, |
|
464 | 442 | "constructor to help legacy API to build a new \"normal\" item"}, |
@@ -109,14 +109,6 b' class DirstateItem(object):' | |||
|
109 | 109 | self._mtime = parentfiledata[2] |
|
110 | 110 | |
|
111 | 111 | @classmethod |
|
112 | def new_possibly_dirty(cls): | |
|
113 | """constructor to help legacy API to build a new "possibly_dirty" item | |
|
114 | ||
|
115 | Should eventually be removed | |
|
116 | """ | |
|
117 | return cls(wc_tracked=True, p1_tracked=True) | |
|
118 | ||
|
119 | @classmethod | |
|
120 | 112 | def new_normal(cls, mode, size, mtime): |
|
121 | 113 | """constructor to help legacy API to build a new "normal" item |
|
122 | 114 |
@@ -117,14 +117,6 b' impl DirstateEntry {' | |||
|
117 | 117 | } |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | pub fn new_possibly_dirty() -> Self { | |
|
121 | Self { | |
|
122 | flags: Flags::WDIR_TRACKED | Flags::P1_TRACKED, | |
|
123 | mode_size: None, | |
|
124 | mtime: None, | |
|
125 | } | |
|
126 | } | |
|
127 | ||
|
128 | 120 | pub fn new_normal(mode: i32, size: i32, mtime: i32) -> Self { |
|
129 | 121 | Self { |
|
130 | 122 | flags: Flags::WDIR_TRACKED | Flags::P1_TRACKED, |
@@ -139,12 +139,6 b' py_class!(pub class DirstateItem |py| {' | |||
|
139 | 139 | } |
|
140 | 140 | |
|
141 | 141 | @classmethod |
|
142 | def new_possibly_dirty(_cls) -> PyResult<Self> { | |
|
143 | let entry = DirstateEntry::new_possibly_dirty(); | |
|
144 | DirstateItem::create_instance(py, Cell::new(entry)) | |
|
145 | } | |
|
146 | ||
|
147 | @classmethod | |
|
148 | 142 | def new_normal(_cls, mode: i32, size: i32, mtime: i32) -> PyResult<Self> { |
|
149 | 143 | let entry = DirstateEntry::new_normal(mode, size, mtime); |
|
150 | 144 | DirstateItem::create_instance(py, Cell::new(entry)) |
General Comments 0
You need to be logged in to leave comments.
Login now