~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Hid raw conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
999
999
        self.this_tree = working_tree
1000
1000
        self.base_tree = base_tree
1001
1001
        self.other_tree = other_tree
1002
 
        self.conflicts = []
 
1002
        self._raw_conflicts = []
1003
1003
        self.cooked_conflicts = []
1004
1004
        self.reprocess = reprocess
1005
1005
        self.show_base = show_base
1097
1097
            return
1098
1098
        if name_winner == "conflict":
1099
1099
            trans_id = self.tt.get_trans_id(file_id)
1100
 
            self.conflicts.append(('name conflict', trans_id, 
1101
 
                                  self.name(this_entry, file_id), 
1102
 
                                  self.name(other_entry, file_id)))
 
1100
            self._raw_conflicts.append(('name conflict', trans_id, 
 
1101
                                        self.name(this_entry, file_id), 
 
1102
                                        self.name(other_entry, file_id)))
1103
1103
        if parent_id_winner == "conflict":
1104
1104
            trans_id = self.tt.get_trans_id(file_id)
1105
 
            self.conflicts.append(('parent conflict', trans_id, 
1106
 
                                   self.parent(this_entry, file_id), 
1107
 
                                   self.parent(other_entry, file_id)))
 
1105
            self._raw_conflicts.append(('parent conflict', trans_id, 
 
1106
                                        self.parent(this_entry, file_id), 
 
1107
                                        self.parent(other_entry, file_id)))
1108
1108
        if other_entry is None:
1109
1109
            # it doesn't matter whether the result was 'other' or 
1110
1110
            # 'conflict'-- if there's no 'other', we leave it alone.
1171
1171
                    self.tt.cancel_versioning(trans_id)
1172
1172
                file_group = self._dump_conflicts(name, parent_id, file_id, 
1173
1173
                                                  set_version=True)
1174
 
                self.conflicts.append(('contents conflict', file_group))
 
1174
                self._raw_conflicts.append(('contents conflict', file_group))
1175
1175
 
1176
1176
    def get_lines(self, tree, file_id):
1177
1177
        if file_id in tree:
1214
1214
        merge3_iterator = iter_merge3(retval)
1215
1215
        self.tt.create_file(merge3_iterator, trans_id)
1216
1216
        if retval["text_conflicts"] is True:
1217
 
            self.conflicts.append(('text conflict', trans_id))
 
1217
            self._raw_conflicts.append(('text conflict', trans_id))
1218
1218
            name = self.tt.final_name(trans_id)
1219
1219
            parent_id = self.tt.final_parent(trans_id)
1220
1220
            file_group = self._dump_conflicts(name, parent_id, file_id, 
1290
1290
        """Convert all conflicts into a form that doesn't depend on trans_id"""
1291
1291
        name_conflicts = {}
1292
1292
        fp = FinalPaths(self.tt)
1293
 
        for conflict in self.conflicts:
 
1293
        for conflict in self._raw_conflicts:
1294
1294
            conflict_type = conflict[0]
1295
1295
            if conflict_type in ('name conflict', 'parent conflict'):
1296
1296
                trans_id = conflict[1]
1365
1365
        conflicts = '<<<<<<<\n' in lines
1366
1366
        self.tt.create_file(lines, trans_id)
1367
1367
        if conflicts:
1368
 
            self.conflicts.append(('text conflict', trans_id))
 
1368
            self._raw_conflicts.append(('text conflict', trans_id))
1369
1369
            name = self.tt.final_name(trans_id)
1370
1370
            parent_id = self.tt.final_parent(trans_id)
1371
1371
            file_group = self._dump_conflicts(name, parent_id, file_id, 
1399
1399
                name = self.tt.final_name(trans_id)
1400
1400
                parent_id = self.tt.final_parent(trans_id)
1401
1401
                self._dump_conflicts(name, parent_id, file_id)
1402
 
            self.conflicts.append(('text conflict', trans_id))
 
1402
            self._raw_conflicts.append(('text conflict', trans_id))
1403
1403
        finally:
1404
1404
            rmtree(temp_dir)