/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 bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2007-07-25 19:32:22 UTC
  • mto: (1551.19.24 Aaron's mergeable stuff)
  • mto: This revision was merged to the branch mainline in revision 2664.
  • Revision ID: abentley@panoramicfeedback.com-20070725193222-lcq4z4980ffd4bf5
Stop using _merge_helper for merging

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        self.change_reporter = change_reporter
90
90
        self._cached_trees = {}
91
91
 
 
92
    @staticmethod
 
93
    def from_uncommitted(tree, other_tree, pb):
 
94
        merger = Merger(tree.branch, other_tree, other_tree.basis_tree(), tree,
 
95
                        pb)
 
96
        merger.base_rev_id = merger.base_tree.get_revision_id()
 
97
        merger.other_rev_id = None
 
98
        return merger
 
99
 
 
100
    @classmethod
 
101
    def from_mergeable(klass, tree, mergeable, pb):
 
102
        mergeable.install_revisions(tree.branch.repository)
 
103
        base_revision_id, other_revision_id, verified =\
 
104
            mergeable.get_merge_request(tree.branch.repository)
 
105
        if base_revision_id in tree.branch.repository.get_ancestry(
 
106
            tree.branch.last_revision(), topo_sorted=False):
 
107
            base_revision_id = None
 
108
        merger = klass.from_revision_ids(pb, tree, other_revision_id,
 
109
                                         base_revision_id)
 
110
        return merger, verified
 
111
 
 
112
    @staticmethod
 
113
    def from_revision_ids(pb, this, other, base=None, other_branch=None,
 
114
                          base_branch=None):
 
115
        merger = Merger(this.branch, this_tree=this, pb=pb)
 
116
        if other_branch is None:
 
117
            other_branch = this.branch
 
118
        merger.set_other_revision(other, other_branch)
 
119
        if base is None:
 
120
            merger.find_base()
 
121
        else:
 
122
            if base_branch is None:
 
123
                base_branch = other_branch
 
124
            merger.set_base_revision(base, base_branch)
 
125
        return merger
 
126
 
92
127
    def revision_tree(self, revision_id, branch=None):
93
128
        if revision_id not in self._cached_trees:
94
129
            if branch is None: