~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-06-28 14:14:16 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070628141416-lf6u1noi6gk5lf1g
start work on directive cherry-picking

Show diffs side-by-side

added added

removed removed

Lines of Context:
616
616
            if revision is not None:
617
617
                raise errors.BzrCommandError(
618
618
                    'Cannot use -r with merge directives or bundles')
619
 
            revision_id = mergeable.install_revisions(branch_to.repository)
 
619
            mergeable.install_revisions(branch_to.repository)
 
620
            base_revision_id, revision_id, verified = \
 
621
                mergeable.get_merge_request(branch_to.repository)
620
622
            branch_from = branch_to
621
623
        else:
622
624
            branch_from = Branch.open(location)
2660
2662
                if revision is not None:
2661
2663
                    raise errors.BzrCommandError(
2662
2664
                        'Cannot use -r with merge directives or bundles')
2663
 
                other_revision_id = mergeable.install_revisions(
2664
 
                    tree.branch.repository)
2665
 
                revision = [RevisionSpec.from_string(
2666
 
                    'revid:' + other_revision_id)]
 
2665
                mergeable.install_revisions(tree.branch.repository)
 
2666
                base_revision_id, other_revision_id, verified =\
 
2667
                    mergeable.get_merge_request(tree.branch.repository)
 
2668
                revision = []
 
2669
                if base_revision_id not in tree.branch.repository.get_ancestry(
 
2670
                    tree.branch.last_revision(), topo_sorted=False):
 
2671
                    revision.append(RevisionSpec.from_string(
 
2672
                        'revid:' + base_revision_id))
 
2673
                revision.append(RevisionSpec.from_string(
 
2674
                    'revid:' + other_revision_id))
2667
2675
 
2668
2676
        if revision is None \
2669
2677
                or len(revision) < 1 or revision[0].needs_branch():