/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Avoid using revision_history in the testsuite, in preparation of deprecating it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
739
739
        The delta is relative to its mainline predecessor, or the
740
740
        empty tree for revision 1.
741
741
        """
742
 
        rh = self.revision_history()
743
 
        if not (1 <= revno <= len(rh)):
 
742
        try:
 
743
            revid = self.get_rev_id(revno-1)
 
744
        except errors.NoSuchRevision:
744
745
            raise errors.InvalidRevisionNumber(revno)
745
 
        return self.repository.get_revision_delta(rh[revno-1])
 
746
        return self.repository.get_revision_delta(revid)
746
747
 
747
748
    def get_stacked_on_url(self):
748
749
        """Get the URL this branch is stacked against.