~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-22 18:09:04 UTC
  • mfrom: (2485.8.63 bzr.connection.sharing)
  • Revision ID: pqm@pqm.ubuntu.com-20070722180904-wy7y7oyi32wbghgf
Transport connection sharing

Show diffs side-by-side

added added

removed removed

Lines of Context:
634
634
                raise errors.NoCommits(b)
635
635
        revision_source = revision.MultipleRevisionSources(
636
636
                branch.repository, other_branch.repository)
637
 
        rev_id = revision.common_ancestor(revision_a, revision_b,
638
 
                                          revision_source)
 
637
        graph = branch.repository.get_graph(other_branch.repository)
 
638
        revision_a = revision.ensure_null(revision_a)
 
639
        revision_b = revision.ensure_null(revision_b)
 
640
        if revision.NULL_REVISION in (revision_a, revision_b):
 
641
            rev_id = revision.NULL_REVISION
 
642
        else:
 
643
            rev_id = graph.find_unique_lca(revision_a, revision_b)
 
644
            if rev_id == revision.NULL_REVISION:
 
645
                raise errors.NoCommonAncestor(revision_a, revision_b)
639
646
        try:
640
647
            revno = branch.revision_id_to_revno(rev_id)
641
648
        except errors.NoSuchRevision: