~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-13 17:48:49 UTC
  • mfrom: (2946.3.5 tree_root_id)
  • Revision ID: pqm@pqm.ubuntu.com-20071113174849-2zsajpakcs8uy1bo
(John Arbash Meinel) Consolidate all calls to get the root id of a tree to use Tree.get_root_id()

Show diffs side-by-side

added added

removed removed

Lines of Context:
1541
1541
                                change_reporter=change_reporter)
1542
1542
                    if (basis_tree.inventory.root is None and
1543
1543
                        new_basis_tree.inventory.root is not None):
1544
 
                        self.set_root_id(new_basis_tree.inventory.root.file_id)
 
1544
                        self.set_root_id(new_basis_tree.get_root_id())
1545
1545
                finally:
1546
1546
                    pb.finished()
1547
1547
                    basis_tree.unlock()
2154
2154
            try:
2155
2155
                to_tree = self.branch.basis_tree()
2156
2156
                if basis.inventory.root is None:
2157
 
                    self.set_root_id(to_tree.inventory.root.file_id)
 
2157
                    self.set_root_id(to_tree.get_root_id())
2158
2158
                    self.flush()
2159
2159
                result += merge.merge_inner(
2160
2160
                                      self.branch,
2740
2740
                         _bzrdir=a_bzrdir)
2741
2741
        basis_tree = branch.repository.revision_tree(revision_id)
2742
2742
        if basis_tree.inventory.root is not None:
2743
 
            wt.set_root_id(basis_tree.inventory.root.file_id)
 
2743
            wt.set_root_id(basis_tree.get_root_id())
2744
2744
        # set the parent list and cache the basis tree.
2745
2745
        if _mod_revision.is_null(revision_id):
2746
2746
            parent_trees = []
2842
2842
            basis_tree = branch.repository.revision_tree(revision_id)
2843
2843
            # only set an explicit root id if there is one to set.
2844
2844
            if basis_tree.inventory.root is not None:
2845
 
                wt.set_root_id(basis_tree.inventory.root.file_id)
 
2845
                wt.set_root_id(basis_tree.get_root_id())
2846
2846
            if revision_id == NULL_REVISION:
2847
2847
                wt.set_parent_trees([])
2848
2848
            else: