Mercurial > hg
changeset 48987:9bb700223f00 stable
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
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 28 Mar 2022 17:24:41 +0200 |
parents | 6e7ae547e38d |
children | d4b66dc500c5 |
files | mercurial/cext/parsers.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;