dirstate: narrow gathering of parent data
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Oct 2021 02:01:12 +0200
changeset 48153 42ab0bcb6ded
parent 48152 98b3eb6c1479
child 48154 fb3b41d583c2
dirstate: narrow gathering of parent data 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. Differential Revision: https://phab.mercurial-scm.org/D11584
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Oct 01 01:27:53 2021 +0200
+++ b/mercurial/dirstate.py	Fri Oct 01 02:01:12 2021 +0200
@@ -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(