~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-20 14:19:21 UTC
  • mfrom: (2598.5.19 nullrevision)
  • Revision ID: pqm@pqm.ubuntu.com-20070820141921-kmbpaev7g9epuy08
NULL_REVISION is returned to indicate the null revision, not None

Show diffs side-by-side

added added

removed removed

Lines of Context:
437
437
        if ph:
438
438
            return ph[-1]
439
439
        else:
440
 
            return None
 
440
            return _mod_revision.NULL_REVISION
441
441
 
442
442
    def last_revision_info(self):
443
443
        """Return information about the last revision.
497
497
    def get_rev_id(self, revno, history=None):
498
498
        """Find the revision id of the specified revno."""
499
499
        if revno == 0:
500
 
            return None
 
500
            return _mod_revision.NULL_REVISION
501
501
        if history is None:
502
502
            history = self.revision_history()
503
503
        if revno <= 0 or revno > len(history):
1900
1900
    def last_revision(self):
1901
1901
        """Return last revision id, or None"""
1902
1902
        revision_id = self.last_revision_info()[1]
1903
 
        if revision_id == _mod_revision.NULL_REVISION:
1904
 
            revision_id = None
1905
1903
        return revision_id
1906
1904
 
1907
1905
    def _write_last_revision_info(self, revno, revision_id):