dirstate: properly update `_lastnormaltime` in `update_file`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 04:43:14 +0200
changeset 47695 f98145ce78d7
parent 47694 1c06ef8f5ea5
child 47696 ff481c238496
dirstate: properly update `_lastnormaltime` in `update_file` This was previously overlooked. Differential Revision: https://phab.mercurial-scm.org/D11137
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Thu Jul 15 04:55:57 2021 +0200
+++ b/mercurial/dirstate.py	Mon Jul 19 04:43:14 2021 +0200
@@ -620,6 +620,14 @@
             possibly_dirty=possibly_dirty,
             parentfiledata=parentfiledata,
         )
+        if (
+            parentfiledata is not None
+            and parentfiledata[2] > self._lastnormaltime
+        ):
+            # Remember the most recent modification timeslot for status(),
+            # to make sure we won't miss future size-preserving file content
+            # modifications that happen within the same timeslot.
+            self._lastnormaltime = parentfiledata[2]
 
     def _addpath(
         self,