Patchwork D11588: dirstate: drop some duplicated code

login
register
mail settings
Submitter phabricator
Date Oct. 3, 2021, 12:26 a.m.
Message ID <differential-rev-PHID-DREV-4npg3duoj5234unjhieh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49911/
State Superseded
Headers show

Comments

phabricator - Oct. 3, 2021, 12:26 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The same operation is done a handful a line lower.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -582,17 +582,8 @@ 
         # this mean we are doing call for file we do not really care about the
         # data (eg: added or removed), however this should be a minor overhead
         # compared to the overall update process calling this.
-        if need_parent_file_data:
-            if parentfiledata is None:
-                parentfiledata = self._get_filedata(filename)
-            mtime = parentfiledata[2]
-
-            if mtime > 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 = mtime
+        if need_parent_file_data or parentfiledata is None:
+            parentfiledata = self._get_filedata(filename)
 
         self._map.reset_state(
             filename,