Patchwork D11790: dirstate: stop gathering parentfiledata in update_file_p1

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2021, 11:14 a.m.
Message ID <differential-rev-PHID-DREV-376px3ynakkzapqbrtqn-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50114/
State New
Headers show

Comments

phabricator - Nov. 24, 2021, 11:14 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Gathering information here assume that they are valid cache information for a
  clean file. It is true most of the time, but not garanteed.
  
  So we drop this and will let the next `hg status` call record actual information.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -536,10 +536,6 @@ 
             if entry is not None and entry.added:
                 return  # avoid dropping copy information (maybe?)
 
-        parentfiledata = None
-        if wc_tracked and p1_tracked:
-            parentfiledata = self._get_filedata(filename)
-
         self._map.reset_state(
             filename,
             wc_tracked,
@@ -547,16 +543,7 @@ 
             # the underlying reference might have changed, we will have to
             # check it.
             has_meaningful_mtime=False,
-            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(