~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.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:
1166
1166
                     t in self.revision_trees(required_trees))
1167
1167
        for revision in revisions:
1168
1168
            if not revision.parent_ids:
1169
 
                old_tree = self.revision_tree(None)
 
1169
                old_tree = self.revision_tree(_mod_revision.NULL_REVISION)
1170
1170
            else:
1171
1171
                old_tree = trees[revision.parent_ids[0]]
1172
1172
            yield trees[revision.revision_id].changes_from(old_tree)
1658
1658
    def revision_tree(self, revision_id):
1659
1659
        """Return Tree for a revision on this branch.
1660
1660
 
1661
 
        `revision_id` may be None for the empty tree revision.
 
1661
        `revision_id` may be NULL_REVISION for the empty tree revision.
1662
1662
        """
 
1663
        revision_id = _mod_revision.ensure_null(revision_id)
1663
1664
        # TODO: refactor this to use an existing revision object
1664
1665
        # so we don't need to read it in twice.
1665
 
        if revision_id is None or revision_id == _mod_revision.NULL_REVISION:
 
1666
        if revision_id == _mod_revision.NULL_REVISION:
1666
1667
            return RevisionTree(self, Inventory(root_id=None), 
1667
1668
                                _mod_revision.NULL_REVISION)
1668
1669
        else:
1959
1960
            present_parents.append(p_id)
1960
1961
            parent_trees[p_id] = repository.revision_tree(p_id)
1961
1962
        else:
1962
 
            parent_trees[p_id] = repository.revision_tree(None)
 
1963
            parent_trees[p_id] = repository.revision_tree(
 
1964
                                     _mod_revision.NULL_REVISION)
1963
1965
 
1964
1966
    inv = revision_tree.inventory
1965
1967
    entries = inv.iter_entries()