~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-18 21:07:10 UTC
  • mfrom: (2490.2.27 graphwalker)
  • Revision ID: pqm@pqm.ubuntu.com-20070618210710-6y8wzcqiw2kvxdiy
Better merge base selection and graph API

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
from bzrlib.branch import Branch
56
56
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
57
57
from bzrlib.conflicts import ConflictList
58
 
from bzrlib.revision import common_ancestor
59
58
from bzrlib.revisionspec import RevisionSpec
60
59
from bzrlib.workingtree import WorkingTree
61
60
""")
2560
2559
        last1 = branch1.last_revision()
2561
2560
        last2 = branch2.last_revision()
2562
2561
 
2563
 
        source = MultipleRevisionSources(branch1.repository, 
2564
 
                                         branch2.repository)
2565
 
        
2566
 
        base_rev_id = common_ancestor(last1, last2, source)
 
2562
        graph = branch1.repository.get_graph(branch2.repository)
 
2563
        base_rev_id = graph.find_unique_lca(last1, last2)
2567
2564
 
2568
2565
        print 'merge base is revision %s' % base_rev_id
2569
2566
 
2807
2804
                                             " merges.  Not cherrypicking or"
2808
2805
                                             " multi-merges.")
2809
2806
            repository = tree.branch.repository
2810
 
            base_revision = common_ancestor(parents[0],
2811
 
                                            parents[1], repository)
 
2807
            graph = repository.get_graph()
 
2808
            base_revision = graph.find_unique_lca(parents[0], parents[1])
2812
2809
            base_tree = repository.revision_tree(base_revision)
2813
2810
            other_tree = repository.revision_tree(parents[1])
2814
2811
            interesting_ids = None