~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

Deprecated fetch.fetch and fetch.greedy_fetch for branch.fetch, and move the Repository.fetch internals to InterRepo and InterWeaveRepo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
                           UnrelatedBranches,
36
36
                           WorkingTreeNotRevision,
37
37
                           )
38
 
from bzrlib.fetch import greedy_fetch, fetch
39
38
import bzrlib.osutils
40
39
from bzrlib.osutils import rename, pathjoin
41
40
from bzrlib.revision import common_ancestor, is_ancestor, NULL_REVISION
239
238
    else:
240
239
        if local_branch is not None:
241
240
            if local_branch.base != branch.base:
242
 
                greedy_fetch(local_branch, branch, revision)
 
241
                local_branch.fetch(branch, revision)
243
242
            base_tree = local_branch.repository.revision_tree(revision)
244
243
        else:
245
244
            base_tree = branch.repository.revision_tree(revision)
425
424
            if self.other_basis is None:
426
425
                raise NoCommits(other_branch)
427
426
        if other_branch.base != self.this_branch.base:
428
 
            fetch(from_branch=other_branch, to_branch=self.this_branch, 
429
 
                  last_revision=self.other_basis)
 
427
            self.this_branch.fetch(other_branch, last_revision=self.other_basis)
430
428
 
431
429
    def set_base(self, base_revision):
432
430
        mutter("doing merge() with no base_revision specified")
448
446
                self.base_rev_id = None
449
447
            else:
450
448
                self.base_rev_id = base_branch.get_rev_id(base_revision[1])
451
 
            fetch(from_branch=base_branch, to_branch=self.this_branch)
 
449
            self.this_branch.fetch(base_branch)
452
450
            self.base_is_ancestor = is_ancestor(self.this_basis, 
453
451
                                                self.base_rev_id,
454
452
                                                self.this_branch)