~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-09-05 01:31:37 UTC
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: aaron.bentley@utoronto.ca-20050905013137-c8b598b5a90a52a9
Fixed the revno bug in log

Show diffs side-by-side

added added

removed removed

Lines of Context:
1348
1348
        finally:
1349
1349
            self.unlock()
1350
1350
 
 
1351
    def check_revno(self, revno):
 
1352
        """\
 
1353
        Check whether a revno corresponds to any revision.
 
1354
        Zero (the NULL revision) is considered valid.
 
1355
        """
 
1356
        if revno != 0:
 
1357
            self.check_real_revno(revno)
 
1358
            
 
1359
    def check_real_revno(self, revno):
 
1360
        """\
 
1361
        Check whether a revno corresponds to a real revision.
 
1362
        Zero (the NULL revision) is considered invalid
 
1363
        """
 
1364
        if revno < 1 or revno > self.revno():
 
1365
            raise InvalidRevisionNumber(revno)
 
1366
        
1351
1367
        
1352
1368
 
1353
1369