dirstate-cext: properly invalidate mtime and data in `set_untracked`
This was forgotten about in the initial implementation and was revealed while
adding the `dirstate-v2` variant of `test-issue660.t`. Neither the existing
Python implementation nor the upcoming Rust implementation suffer from this
bug since they respectively have `None` and `Option<T>` to represent the lack
of information.
Differential Revision: https://phab.mercurial-scm.org/D12414
--- a/mercurial/cext/parsers.c Tue Mar 22 03:19:01 2022 +0100
+++ b/mercurial/cext/parsers.c Mon Mar 28 17:24:41 2022 +0200
@@ -517,6 +517,8 @@
static PyObject *dirstate_item_set_untracked(dirstateItemObject *self)
{
self->flags &= ~dirstate_flag_wc_tracked;
+ self->flags &= ~dirstate_flag_has_meaningful_data;
+ self->flags &= ~dirstate_flag_has_mtime;
self->mode = 0;
self->size = 0;
self->mtime_s = 0;