diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -487,9 +487,11 @@ to make sure it is correct. */ static PyObject *dirstate_item_set_possibly_dirty(dirstateItemObject *self) { - if (self->flags |= dirstate_flag_possibly_dirty) { + self->flags |= dirstate_flag_possibly_dirty; + if (self->flags) { Py_RETURN_NONE; } + return NULL; } /* See docstring of the python implementation for details */