/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/memorytree.py

  • Committer: John Arbash Meinel
  • Date: 2008-09-05 03:11:40 UTC
  • mfrom: (3691 +trunk)
  • mto: (3697.7.4 1.7)
  • mto: This revision was merged to the branch mainline in revision 3748.
  • Revision ID: john@arbash-meinel.com-20080905031140-hj0adlcf30l7i99v
Merge in bzr.dev 3691

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    def create_on_branch(branch):
71
71
        """Create a MemoryTree for branch, using the last-revision of branch."""
72
72
        revision_id = _mod_revision.ensure_null(branch.last_revision())
73
 
        if _mod_revision.is_null(revision_id):
74
 
            revision_id = None
75
73
        return MemoryTree(branch, revision_id)
76
74
 
77
75
    def _gather_kinds(self, files, kinds):
216
214
        """Populate the in-tree state from the branch."""
217
215
        self._basis_tree = self.branch.repository.revision_tree(
218
216
            self._branch_revision_id)
219
 
        if self._branch_revision_id is None:
 
217
        if self._branch_revision_id == _mod_revision.NULL_REVISION:
220
218
            self._parent_ids = []
221
219
        else:
222
220
            self._parent_ids = [self._branch_revision_id]
282
280
            _mod_revision.check_not_reserved_id(revision_id)
283
281
        if len(revision_ids) == 0:
284
282
            self._parent_ids = []
285
 
            self._basis_tree = self.branch.repository.revision_tree(None)
 
283
            self._basis_tree = self.branch.repository.revision_tree(
 
284
                                    _mod_revision.NULL_REVISION)
286
285
        else:
287
286
            self._parent_ids = revision_ids
288
287
            self._basis_tree = self.branch.repository.revision_tree(
293
292
        """See MutableTree.set_parent_trees()."""
294
293
        if len(parents_list) == 0:
295
294
            self._parent_ids = []
296
 
            self._basis_tree = self.branch.repository.revision_tree(None)
 
295
            self._basis_tree = self.branch.repository.revision_tree(
 
296
                                   _mod_revision.NULL_REVISION)
297
297
        else:
298
298
            if parents_list[0][1] is None and not allow_leftmost_as_ghost:
299
299
                # a ghost in the left most parent
300
300
                raise errors.GhostRevisionUnusableHere(parents_list[0][0])
301
301
            self._parent_ids = [parent_id for parent_id, tree in parents_list]
302
302
            if parents_list[0][1] is None or parents_list[0][1] == 'null:':
303
 
                self._basis_tree = self.branch.repository.revision_tree(None)
 
303
                self._basis_tree = self.branch.repository.revision_tree(
 
304
                                       _mod_revision.NULL_REVISION)
304
305
            else:
305
306
                self._basis_tree = parents_list[0][1]
306
307
            self._branch_revision_id = parents_list[0][0]