/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/transform.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:
495
495
            return None
496
496
        # the file is old; the old id is still valid
497
497
        if self._new_root == trans_id:
498
 
            return self._tree.inventory.root.file_id
 
498
            return self._tree.get_root_id()
499
499
        return self._tree.inventory.path2id(path)
500
500
 
501
501
    def final_file_id(self, trans_id):
905
905
                        self.rename_count += 1
906
906
                if trans_id in self._removed_id:
907
907
                    if trans_id == self._new_root:
908
 
                        file_id = self._tree.inventory.root.file_id
 
908
                        file_id = self._tree.get_root_id()
909
909
                    else:
910
910
                        file_id = self.tree_file_id(trans_id)
911
911
                    assert file_id is not None
1283
1283
        # is set within the tree, nor setting the root and thus
1284
1284
        # marking the tree as dirty, because we use two different
1285
1285
        # idioms here: tree interfaces and inventory interfaces.
1286
 
        if wt.path2id('') != tree.inventory.root.file_id:
1287
 
            wt.set_root_id(tree.inventory.root.file_id)
 
1286
        if wt.get_root_id() != tree.get_root_id():
 
1287
            wt.set_root_id(tree.get_root_id())
1288
1288
            wt.flush()
1289
1289
    tt = TreeTransform(wt)
1290
1290
    divert = set()