~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2005-08-25 15:23:10 UTC
  • mto: (1092.1.42) (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: abentley@panoramicfeedback.com-20050825152310-897f26086c7fb592
Fixed negative revision handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
919
919
        if history is None:
920
920
            history = self.revision_history()
921
921
        elif revno <= 0 or revno > len(history):
922
 
            raise bzrlib.errors.NoSuchRevision(self, revision)
 
922
            raise bzrlib.errors.NoSuchRevision(self, revno)
923
923
        return history[revno - 1]
924
924
 
925
925
    def _get_revision_info(self, revision):
948
948
                revno = len(revs) + revision + 1
949
949
            else:
950
950
                revno = revision
951
 
            rev_id = self.get_rev_id(revision, revs)
 
951
            rev_id = self.get_rev_id(revno, revs)
952
952
        elif isinstance(revision, basestring):
953
953
            for prefix, func in Branch.REVISION_NAMESPACES.iteritems():
954
954
                if revision.startswith(prefix):