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

  • Committer: Aaron Bentley
  • Date: 2007-07-11 16:42:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: abentley@panoramicfeedback.com-20070711164237-n1x38fz7fttybkqp
Push NULL_REVISION deeper

Show diffs side-by-side

added added

removed removed

Lines of Context:
503
503
        This implementation reads the pending merges list and last_revision
504
504
        value and uses that to decide what the parents list should be.
505
505
        """
506
 
        last_rev = self._last_revision()
 
506
        last_rev = _mod_revision.ensure_null(self._last_revision())
507
507
        if _mod_revision.is_null(last_rev):
508
508
            parents = []
509
509
        else:
741
741
        if len(revision_ids) > 0:
742
742
            self.set_last_revision(revision_ids[0])
743
743
        else:
744
 
            self.set_last_revision(None)
 
744
            self.set_last_revision(_mod_revision.NULL_REVISION)
745
745
 
746
746
        self._set_merges_from_parent_ids(revision_ids)
747
747
 
756
756
            allow_leftmost_as_ghost=allow_leftmost_as_ghost)
757
757
 
758
758
        if len(parent_ids) == 0:
759
 
            leftmost_parent_id = None
 
759
            leftmost_parent_id = _mod_revision.NULL_REVISION
760
760
            leftmost_parent_tree = None
761
761
        else:
762
762
            leftmost_parent_id, leftmost_parent_tree = parents_list[0]
2066
2066
            for parent in merges:
2067
2067
                parent_trees.append(
2068
2068
                    (parent, self.branch.repository.revision_tree(parent)))
2069
 
            if not _mod_revision.is_null(old_tip):
 
2069
            if (old_tip is not None and not _mod_revision.is_null(old_tip)):
2070
2070
                parent_trees.append(
2071
2071
                    (old_tip, self.branch.repository.revision_tree(old_tip)))
2072
2072
            self.set_parent_trees(parent_trees)
2075
2075
            # the working tree had the same last-revision as the master
2076
2076
            # branch did. We may still have pivot local work from the local
2077
2077
            # branch into old_tip:
2078
 
            if not _mod_revision.is_null(old_tip):
 
2078
            if (old_tip is not None and not _mod_revision.is_null(old_tip)):
2079
2079
                self.add_parent_tree_id(old_tip)
2080
 
        if not _mod_revision.is_null(old_tip) and old_tip != last_rev:
 
2080
        if (old_tip is not None and not _mod_revision.is_null(old_tip)
 
2081
            and old_tip != last_rev):
2081
2082
            # our last revision was not the prior branch last revision
2082
2083
            # and we have converted that last revision to a pending merge.
2083
2084
            # base is somewhere between the branch tip now