Patchwork D11138: dirstate: properly update `_lastnormaltime` in `update_file_p1`

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 10:42 a.m.
Message ID <differential-rev-PHID-DREV-upof6ls4ucwkvjer7erj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49450/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 10:42 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This was previously overlooked.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -552,6 +552,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]
 
     @requires_parents_change
     def update_file(