~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/clone.py

Made InvalidRevisionId take the revision_id as a parameter, fixed up locations where it was called.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        branch_from.unlock()
100
100
 
101
101
 
102
 
def _get_truncated_history(branch_from, revision):
 
102
def _get_truncated_history(branch_from, revision_id):
103
103
    history = branch_from.revision_history()
104
 
    if revision is None:
 
104
    if revision_id is None:
105
105
        return history
106
106
    try:
107
 
        idx = history.index(revision)
 
107
        idx = history.index(revision_id)
108
108
    except ValueError:
109
 
        raise InvalidRevisionId('revision {%s} is not on the mainline of %s' 
110
 
                                % (revision, branch_from))
 
109
        raise InvalidRevisionId(revision_id=revision_id)
111
110
    return history[:idx+1]
112
111
 
113
112
def _copy_text_weaves(branch_from, branch_to):