~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Robert Collins
  • Date: 2006-02-21 11:42:36 UTC
  • mfrom: (1534.1.36 inter-repo-api)
  • mto: This revision was merged to the branch mainline in revision 1560.
  • Revision ID: robertc@robertcollins.net-20060221114236-0deb1948f0c8c956
Merge in InterRepository API support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                           UnrelatedBranches,
35
35
                           WorkingTreeNotRevision,
36
36
                           )
37
 
from bzrlib.fetch import greedy_fetch, fetch
38
37
from bzrlib.merge3 import Merge3
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
 
41
from bzrlib.trace import mutter, warning, note
42
42
from bzrlib.transform import (TreeTransform, resolve_conflicts, cook_conflicts,
43
43
                              conflicts_strings, FinalPaths, create_by_entry,
44
44
                              unique_add)
45
 
from bzrlib.trace import mutter, warning, note
46
45
 
47
46
# TODO: Report back as changes are merged in
48
47
 
66
65
    else:
67
66
        if local_branch is not None:
68
67
            if local_branch.base != branch.base:
69
 
                greedy_fetch(local_branch, branch, revision)
 
68
                local_branch.fetch(branch, revision)
70
69
            base_tree = local_branch.repository.revision_tree(revision)
71
70
        else:
72
71
            base_tree = branch.repository.revision_tree(revision)
194
193
            if self.other_basis is None:
195
194
                raise NoCommits(other_branch)
196
195
        if other_branch.base != self.this_branch.base:
197
 
            fetch(from_branch=other_branch, to_branch=self.this_branch, 
198
 
                  last_revision=self.other_basis)
 
196
            self.this_branch.fetch(other_branch, last_revision=self.other_basis)
199
197
 
200
198
    def set_base(self, base_revision):
201
199
        mutter("doing merge() with no base_revision specified")
217
215
                self.base_rev_id = None
218
216
            else:
219
217
                self.base_rev_id = base_branch.get_rev_id(base_revision[1])
220
 
            fetch(from_branch=base_branch, to_branch=self.this_branch)
 
218
            self.this_branch.fetch(base_branch)
221
219
            self.base_is_ancestor = is_ancestor(self.this_basis, 
222
220
                                                self.base_rev_id,
223
221
                                                self.this_branch)