D12414: dirstate-cext: properly invalidate mtime and data in `set_untracked`

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Mon Mar 28 15:29:35 UTC 2022


Alphare created this revision.
Alphare added a comment.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.


  Pending CI refresh

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D12414

AFFECTED FILES
  mercurial/cext/parsers.c

CHANGE DETAILS

diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -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;



To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list