~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Aaron Bentley
  • Date: 2006-08-05 22:59:38 UTC
  • mto: (1731.1.33 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: aaron.bentley@utoronto.ca-20060805225938-e8b97cabbe70f571
More removal of unique-root stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
832
832
        The inventory is created with a default root directory, with
833
833
        an id of None.
834
834
        """
835
 
        if root_id is not None:
836
 
            self.root = InventoryDirectory(root_id, '', None)
837
 
            self._byid = {self.root.file_id: self.root}
838
 
        else:
839
 
            self.root = None
840
 
            self._byid = {}
 
835
        # We are letting Branch.create() create a unique inventory
 
836
        # root id. Rather than generating a random one here.
 
837
        #if root_id is None:
 
838
        #    root_id = bzrlib.branch.gen_file_id('TREE_ROOT')
 
839
        self.root = InventoryDirectory(root_id, '', None)
 
840
        # FIXME: this isn't ever used, changing it to self.revision may break
 
841
        # things. TODO make everything use self.revision_id
841
842
        self.revision_id = revision_id
 
843
        self._byid = {self.root.file_id: self.root}
842
844
 
843
845
    def copy(self):
844
846
        # TODO: jam 20051218 Should copy also copy the revision_id?