comparison mercurial/dirstate.py @ 48141:42ab0bcb6ded

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 02:01:12 +0200
parents 98b3eb6c1479
children 6f54afb094bd
comparison
equal deleted inserted replaced
48140:98b3eb6c1479 48141:42ab0bcb6ded
523 self._dirty = True 523 self._dirty = True
524 elif (not p1_tracked) and wc_tracked: 524 elif (not p1_tracked) and wc_tracked:
525 if entry is not None and entry.added: 525 if entry is not None and entry.added:
526 return # avoid dropping copy information (maybe?) 526 return # avoid dropping copy information (maybe?)
527 527
528 # this mean we are doing call for file we do not really care about the
529 # data (eg: added or removed), however this should be a minor overhead
530 # compared to the overall update process calling this.
531 parentfiledata = None 528 parentfiledata = None
532 if wc_tracked: 529 if wc_tracked and p1_tracked:
533 parentfiledata = self._get_filedata(filename) 530 parentfiledata = self._get_filedata(filename)
534 531
535 self._map.reset_state( 532 self._map.reset_state(
536 filename, 533 filename,
537 wc_tracked, 534 wc_tracked,