~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2077
2077
        if revision_id is None:
2078
2078
            revno, revision_id = self.last_revision_info()
2079
2079
        else:
2080
 
            revno = self.revision_id_to_revno(revision_id)
 
2080
            # To figure out the revno for a random revision, we need to build
 
2081
            # the revision history, and count its length.
 
2082
            # We don't care about the order, just how long it is.
 
2083
            # Alternatively, we could start at the current location, and count
 
2084
            # backwards. But there is no guarantee that we will find it since
 
2085
            # it may be a merged revision.
 
2086
            revno = len(list(self.repository.iter_reverse_revision_history(
 
2087
                                                                revision_id)))
2081
2088
        destination.set_last_revision_info(revno, revision_id)
2082
2089
 
2083
2090
    def _make_tags(self):