~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

lalos branch constructor patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib.merge_core import merge_flex, ApplyMerge3, BackupBeforeChange
27
27
from bzrlib.changeset import generate_changeset, ExceptionConflictHandler
28
28
from bzrlib.changeset import Inventory, Diff3Merge
29
 
from bzrlib.branch import find_branch
 
29
from bzrlib.branch import Branch
30
30
from bzrlib.errors import BzrCommandError, UnrelatedBranches, NoCommonAncestor
31
31
from bzrlib.errors import NoCommits
32
32
from bzrlib.delta import compare_trees
134
134
            
135
135
def get_tree(treespec, temp_root, label, local_branch=None):
136
136
    location, revno = treespec
137
 
    branch = find_branch(location)
 
137
    branch = Branch.open(location)
138
138
    if revno is None:
139
139
        revision = None
140
140
    elif revno == -1:
141
141
        revision = branch.last_patch()
142
142
    else:
143
 
        revision = branch.lookup_revision(revno)
 
143
        revision = branch.get_rev_id(revno)
144
144
    return branch, get_revid_tree(branch, revision, temp_root, label,
145
145
                                  local_branch)
146
146
 
244
244
    try:
245
245
        if this_dir is None:
246
246
            this_dir = '.'
247
 
        this_branch = find_branch(this_dir)
 
247
        this_branch = Branch.open_containing(this_dir)
248
248
        this_rev_id = this_branch.last_patch()
249
249
        if this_rev_id is None:
250
250
            raise BzrCommandError("This branch has no commits")
261
261
                raise NoCommits(other_branch)
262
262
            other_basis = other_rev_id
263
263
        elif other_revision[1] is not None:
264
 
            other_rev_id = other_branch.lookup_revision(other_revision[1])
 
264
            other_rev_id = other_branch.get_rev_id(other_revision[1])
265
265
            other_basis = other_rev_id
266
266
        else:
267
267
            other_rev_id = None
284
284
            elif base_revision[1] is None:
285
285
                base_rev_id = None
286
286
            else:
287
 
                base_rev_id = base_branch.lookup_revision(base_revision[1])
 
287
                base_rev_id = base_branch.get_rev_id(base_revision[1])
288
288
            if base_rev_id is not None:
289
289
                base_is_ancestor = is_ancestor(this_rev_id, base_rev_id, 
290
290
                                               MultipleRevisionSources(this_branch,