~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-04 14:08:14 UTC
  • mfrom: (6187 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6189.
  • Revision ID: jelmer@samba.org-20111004140814-cltag93d2l5j9zyf
MergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

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