~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Martin Pool
  • Date: 2005-07-15 23:35:18 UTC
  • Revision ID: mbp@sourcefrog.net-20050715233518-04217797d302244f
- optimization for Inventory.id2path; access byid map directly rather than 
  through the __getitem__ on the inventory; rather faster

Show diffs side-by-side

added added

removed removed

Lines of Context:
565
565
        """Return as a list the path to file_id."""
566
566
 
567
567
        # get all names, skipping root
568
 
        p = [self[fid].name for fid in self.get_idpath(file_id)[1:]]
 
568
        p = [self._byid[fid].name for fid in self.get_idpath(file_id)[1:]]
569
569
        return os.sep.join(p)
570
570
            
571
571