~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2007-07-12 07:22:52 UTC
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: aaron.bentley@utoronto.ca-20070712072252-67b3yxu8650t6sgm
Updates from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
504
504
        value and uses that to decide what the parents list should be.
505
505
        """
506
506
        last_rev = _mod_revision.ensure_null(self._last_revision())
507
 
        if _mod_revision.is_null(last_rev):
 
507
        if _mod_revision.NULL_REVISION == last_rev:
508
508
            parents = []
509
509
        else:
510
510
            parents = [last_rev]
2701
2701
        control_files.put_utf8('format', self.get_format_string())
2702
2702
        branch = a_bzrdir.open_branch()
2703
2703
        if revision_id is None:
2704
 
            revision_id = branch.last_revision()
 
2704
            revision_id = _mod_revision.ensure_null(branch.last_revision())
2705
2705
        else:
2706
2706
            revision_id = osutils.safe_revision_id(revision_id)
2707
2707
        # WorkingTree3 can handle an inventory which has a unique root id.
2723
2723
            # only set an explicit root id if there is one to set.
2724
2724
            if basis_tree.inventory.root is not None:
2725
2725
                wt.set_root_id(basis_tree.inventory.root.file_id)
2726
 
            if revision_id is None or revision_id == NULL_REVISION:
 
2726
            if revision_id == NULL_REVISION:
2727
2727
                wt.set_parent_trees([])
2728
2728
            else:
2729
2729
                wt.set_parent_trees([(revision_id, basis_tree)])