/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/merge.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-22 22:46:24 UTC
  • mfrom: (7490.40.105 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200822224624-om4a4idsr7cn8jew
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
790
790
        self.active_hooks = [hook for hook in hooks if hook is not None]
791
791
        with ui.ui_factory.nested_progress_bar() as child_pb:
792
792
            for num, (file_id, changed, paths3, parents3, names3,
793
 
                      executable3) in enumerate(entries):
 
793
                      executable3, copied) in enumerate(entries):
 
794
                if copied:
 
795
                    # Treat copies as simple adds for now
 
796
                    paths3 = (None, paths3[1], None)
 
797
                    parents3 = (None, parents3[1], None)
 
798
                    names3 = (None, names3[1], None)
 
799
                    executable3 = (None, executable3[1], None)
 
800
                    changed = True
 
801
                    copied = False
794
802
                trans_id = self.tt.trans_id_file_id(file_id)
795
803
                # Try merging each entry
796
804
                child_pb.update(gettext('Preparing file merge'),
861
869
            executable3 = change.executable + (this_executable,)
862
870
            yield (
863
871
                (change.file_id, change.changed_content, paths3,
864
 
                 parents3, names3, executable3))
 
872
                 parents3, names3, executable3, change.copied))
865
873
 
866
874
    def _entries_lca(self):
867
875
        """Gather data about files modified between multiple trees.
871
879
 
872
880
        For the multi-valued entries, the format will be (BASE, [lca1, lca2])
873
881
 
874
 
        :return: [(file_id, changed, paths, parents, names, executable)], where:
 
882
        :return: [(file_id, changed, paths, parents, names, executable, copied)], where:
875
883
 
876
884
            * file_id: Simple file_id of the entry
877
885
            * changed: Boolean, True if the kind or contents changed else False
1041
1049
                           ((base_ie.name, lca_names),
1042
1050
                            other_ie.name, this_ie.name),
1043
1051
                           ((base_ie.executable, lca_executable),
1044
 
                            other_ie.executable, this_ie.executable)
 
1052
                            other_ie.executable, this_ie.executable),
 
1053
                           # Copy detection is not yet supported, so nothing is
 
1054
                           # a copy:
 
1055
                           False
1045
1056
                           )
1046
1057
 
1047
1058
    def write_modified(self, results):
1465
1476
        if self.this_tree.supports_content_filtering():
1466
1477
            filter_tree_path = this_path
1467
1478
        else:
1468
 
            # Skip the id2path lookup for older formats
1469
1479
            filter_tree_path = None
1470
1480
 
1471
1481
        file_group = []