~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

differentiated between this tree(input) and working tree(output) in merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
921
921
class Merge3Merger(object):
922
922
    requires_base = True
923
923
    supports_reprocess = True
924
 
    def __init__(self, working_tree, base_tree, other_tree):
 
924
    def __init__(self, working_tree, this_tree, base_tree, other_tree):
925
925
        object.__init__(self)
926
 
        self.working_tree = working_tree
 
926
        self.this_tree = working_tree
927
927
        self.base_tree = base_tree
928
928
        self.other_tree = other_tree
929
929
        self.conflicts = []
977
977
            return "other"
978
978
 
979
979
    def merge_text(self, file_id):
980
 
        winner = self.scalar_three_way(self.working_tree, self.base_tree, 
 
980
        winner = self.scalar_three_way(self.this_tree, self.base_tree, 
981
981
                                       self.other_tree, file_id, 
982
982
                                       self.contents_sha1)
983
983
        if winner == "this":
984
984
            return
985
985
        trans_id = self.tt.get_trans_id(file_id)
986
 
        if file_id in self.working_tree:
 
986
        if file_id in self.this_tree:
987
987
            self.tt.delete_contents(trans_id)
988
988
        else:
989
989
            entry = self.other_tree.inventory[file_id]
1005
1005
        """Perform a three-way text merge on a file_id"""
1006
1006
        base_lines = self.get_lines(self.base_tree, file_id)
1007
1007
        other_lines = self.get_lines(self.other_tree, file_id)
1008
 
        this_lines = self.get_lines(self.working_tree, file_id)
 
1008
        this_lines = self.get_lines(self.this_tree, file_id)
1009
1009
        m3 = Merge3(base_lines, this_lines, other_lines)
1010
1010
        start_marker = "!START OF MERGE CONFLICT!" + "I HOPE THIS IS UNIQUE"
1011
1011
        if False is True: