~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Martin Pool
  • Date: 2005-05-11 04:57:13 UTC
  • Revision ID: mbp@sourcefrog.net-20050511045713-5175e3084bad6196
- New form 'file_id in tree' to check if the file is present
- Rewrite show_info to work on compare_trees (much faster)
- New form 'for file_id in tree' to iterate through files there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    def has_id(self, file_id):
62
62
        return self.inventory.has_id(file_id)
63
63
 
 
64
    __contains__ = has_id
 
65
 
64
66
    def id_set(self):
65
67
        """Return set of all ids in this tree."""
66
68
        return self.inventory.id_set()
67
69
 
 
70
    def __iter__(self):
 
71
        return iter(self.inventory)
 
72
 
68
73
    def id2path(self, file_id):
69
74
        return self.inventory.id2path(file_id)
70
75