##// END OF EJS Templates
dirstate: use `reset_state` in `update_file_p1`...
marmoute -
r48494:1c06ef8f default
parent child Browse files
Show More
@@ -521,22 +521,38 b' class dirstate(object):'
521 521 wc_tracked = False
522 522 else:
523 523 wc_tracked = entry.tracked
524 possibly_dirty = False
524 525 if p1_tracked and wc_tracked:
525 526 # the underlying reference might have changed, we will have to
526 527 # check it.
527 self.normallookup(filename)
528 possibly_dirty = True
528 529 elif not (p1_tracked or wc_tracked):
529 530 # the file is no longer relevant to anyone
530 531 self._drop(filename)
531 532 elif (not p1_tracked) and wc_tracked:
532 if not entry.added:
533 self._add(filename)
533 if entry is not None and entry.added:
534 return # avoid dropping copy information (maybe?)
534 535 elif p1_tracked and not wc_tracked:
535 if entry is None or not entry.removed:
536 self._remove(filename)
536 pass
537 537 else:
538 538 assert False, 'unreachable'
539 539
540 # this mean we are doing call for file we do not really care about the
541 # data (eg: added or removed), however this should be a minor overhead
542 # compared to the overall update process calling this.
543 parentfiledata = None
544 if wc_tracked:
545 parentfiledata = self._get_filedata(filename)
546
547 self._updatedfiles.add(filename)
548 self._map.reset_state(
549 filename,
550 wc_tracked,
551 p1_tracked,
552 possibly_dirty=possibly_dirty,
553 parentfiledata=parentfiledata,
554 )
555
540 556 @requires_parents_change
541 557 def update_file(
542 558 self,
General Comments 0
You need to be logged in to leave comments. Login now