comparison mercurial/cext/parsers.c @ 47517:28632eb3ca3e

dirstate-entry: restrict `from_p2` property to tracked file The other case is now handled in `from_p2_removed`, and should ideally be moved to a lower level. So we can drop the `state == 'n'` narrowing and move it in the property itself. Differential Revision: https://phab.mercurial-scm.org/D10959
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 04 Jul 2021 01:14:15 +0200
parents b8ffe85e399b
children 8bcae9bf9e8d
comparison
equal deleted inserted replaced
47516:b8ffe85e399b 47517:28632eb3ca3e
176 } 176 }
177 }; 177 };
178 178
179 static PyObject *dirstatetuple_get_from_p2(dirstateTupleObject *self) 179 static PyObject *dirstatetuple_get_from_p2(dirstateTupleObject *self)
180 { 180 {
181 if (self->size == dirstate_v1_from_p2) { 181 if (self->state == 'n' && self->size == dirstate_v1_from_p2) {
182 Py_RETURN_TRUE; 182 Py_RETURN_TRUE;
183 } else { 183 } else {
184 Py_RETURN_FALSE; 184 Py_RETURN_FALSE;
185 } 185 }
186 }; 186 };