/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2008-09-01 14:03:34 UTC
  • mto: (3680.1.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 3689.
  • Revision ID: jelmer@samba.org-20080901140334-iph5u142g49dv3zu
Use NULL_REVISION rather than None for Repository.revision_tree().

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)
1660
1660
 
1661
1661
        `revision_id` may be None 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()