89
89
self.change_reporter = change_reporter
90
90
self._cached_trees = {}
93
def from_uncommitted(tree, other_tree, pb):
94
merger = Merger(tree.branch, other_tree, other_tree.basis_tree(), tree,
96
merger.base_rev_id = merger.base_tree.get_revision_id()
97
merger.other_rev_id = None
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,
110
return merger, verified
113
def from_revision_ids(pb, this, other, base=None, other_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)
122
if base_branch is None:
123
base_branch = other_branch
124
merger.set_base_revision(base, base_branch)
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: