Show More
@@ -638,33 +638,17 b' if rustmod is not None:' | |||
|
638 | 638 | # TODO: move this the whole loop to Rust where `iter_mut` |
|
639 | 639 | # enables in-place mutation of elements of a collection while |
|
640 | 640 | # iterating it, without mutating the collection itself. |
|
641 |
|
|
|
642 | (f, s) | |
|
643 | for f, s in self._map.items() | |
|
644 | if s.merged or s.from_p2 | |
|
641 | files_with_p2_info = [ | |
|
642 | f for f, s in self._map.items() if s.merged or s.from_p2 | |
|
645 | 643 | ] |
|
646 | for f, s in candidatefiles: | |
|
647 | # Discard "merged" markers when moving away from a merge state | |
|
648 |
|
|
|
649 |
|
|
|
650 |
|
|
|
651 |
|
|
|
652 |
|
|
|
653 | f, | |
|
654 | wc_tracked=True, | |
|
655 | p1_tracked=True, | |
|
656 | possibly_dirty=True, | |
|
657 | ) | |
|
658 | # Also fix up otherparent markers | |
|
659 | elif s.from_p2: | |
|
660 | source = self.copymap.get(f) | |
|
661 | if source: | |
|
662 | copies[f] = source | |
|
663 | self.reset_state( | |
|
664 | f, | |
|
665 | p1_tracked=False, | |
|
666 | wc_tracked=True, | |
|
667 | ) | |
|
644 | rust_map = self._map | |
|
645 | for f in files_with_p2_info: | |
|
646 | e = rust_map.get(f) | |
|
647 | source = self.copymap.pop(f, None) | |
|
648 | if source: | |
|
649 | copies[f] = source | |
|
650 | e.drop_merge_data() | |
|
651 | rust_map.set_dirstate_item(f, e) | |
|
668 | 652 | return copies |
|
669 | 653 | |
|
670 | 654 | def parents(self): |
General Comments 0
You need to be logged in to leave comments.
Login now