Patchwork D11584: dirstate: narrow gathering of parent data

login
register
mail settings
Submitter phabricator
Date Oct. 3, 2021, 12:26 a.m.
Message ID <differential-rev-PHID-DREV-kzmuryhsudl6sspyfpzm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49908/
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 parent data are only going to be useful is the file might be clean. And it
  might only be clean if it is tracked in both p1 and the working copy.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -525,11 +525,8 @@ 
             if entry is not None and entry.added:
                 return  # avoid dropping copy information (maybe?)
 
-        # 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.
         parentfiledata = None
-        if wc_tracked:
+        if wc_tracked and p1_tracked:
             parentfiledata = self._get_filedata(filename)
 
         self._map.reset_state(