~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-04 14:22:34 UTC
  • mfrom: (3680.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20080904142234-pldim6ie032cb6am
(Jelmer) Deprecate Repository.revision_tree(None).

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        """Return RevisionTree for the current last revision.
380
380
        
381
381
        If the left most parent is a ghost then the returned tree will be an
382
 
        empty tree - one obtained by calling repository.revision_tree(None).
 
382
        empty tree - one obtained by calling 
 
383
        repository.revision_tree(NULL_REVISION).
383
384
        """
384
385
        try:
385
386
            revision_id = self.get_parent_ids()[0]
387
388
            # no parents, return an empty revision tree.
388
389
            # in the future this should return the tree for
389
390
            # 'empty:' - the implicit root empty tree.
390
 
            return self.branch.repository.revision_tree(None)
 
391
            return self.branch.repository.revision_tree(
 
392
                       _mod_revision.NULL_REVISION)
391
393
        try:
392
394
            return self.revision_tree(revision_id)
393
395
        except errors.NoSuchRevision:
404
406
            if self.branch.repository.has_revision(revision_id):
405
407
                raise
406
408
            # the basis tree is a ghost so return an empty tree.
407
 
            return self.branch.repository.revision_tree(None)
 
409
            return self.branch.repository.revision_tree(
 
410
                       _mod_revision.NULL_REVISION)
408
411
 
409
412
    def _cleanup(self):
410
413
        self._flush_ignore_list_cache()