~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clone.py

  • Committer: Robert Collins
  • Date: 2005-10-18 06:42:17 UTC
  • mfrom: (0.2.1)
  • mto: This revision was merged to the branch mainline in revision 1463.
  • Revision ID: robertc@robertcollins.net-20051018064217-e810bd94c74a9ad1
Factor out the guts of 'pull' from the command into WorkingTree.pull().
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
from bzrlib.branch import Branch
53
53
from bzrlib.trace import mutter, note
54
54
from bzrlib.store import copy_all
55
 
from bzrlib.errors import InvalidRevisionId
56
55
 
57
56
def copy_branch(branch_from, to_location, revision=None, basis_branch=None):
58
57
    """Copy branch_from into the existing directory to_location.
107
106
    try:
108
107
        idx = history.index(revision)
109
108
    except ValueError:
110
 
        raise InvalidRevisionId(revision_id=revision, branch=branch_from)
 
109
        raise InvalidRevisionId('revision {%s} is not on the mainline of %s' 
 
110
                                % (revision, branch_from))
111
111
    return history[:idx+1]
112
112
 
113
113
def _copy_text_weaves(branch_from, branch_to):