~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/memorytree.py

  • Committer: Jelmer Vernooij
  • Date: 2008-09-02 00:29:28 UTC
  • mto: (3680.1.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 3689.
  • Revision ID: jelmer@samba.org-20080902002928-qp0m5mq97t5zm414
Eliminate more uses of Repository.revision_tree(None).

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
    def create_on_branch(branch):
69
69
        """Create a MemoryTree for branch, using the last-revision of branch."""
70
70
        revision_id = _mod_revision.ensure_null(branch.last_revision())
71
 
        if _mod_revision.is_null(revision_id):
72
 
            revision_id = None
73
71
        return MemoryTree(branch, revision_id)
74
72
 
75
73
    def _gather_kinds(self, files, kinds):
206
204
        """Populate the in-tree state from the branch."""
207
205
        self._basis_tree = self.branch.repository.revision_tree(
208
206
            self._branch_revision_id)
209
 
        if self._branch_revision_id is None:
 
207
        if self._branch_revision_id == _mod_revision.NULL_REVISION:
210
208
            self._parent_ids = []
211
209
        else:
212
210
            self._parent_ids = [self._branch_revision_id]