~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-21 13:35:17 UTC
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120221133517-pa3qqwyhrcl0gcqu
Add Tree.iter_child_entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
 
201
201
        :param file_id: File id of the directory/tree-reference
202
202
        :param path: Optional path of the directory
203
 
        :return: Iterator over (name, entry) tuples
 
203
        :raise NoSuchId: When the file_id does not exist
 
204
        :return: Iterator over entries in the directory
204
205
        """
205
206
        raise NotImplementedError(self.iter_child_entries)
206
207
 
883
884
    @needs_read_lock
884
885
    def iter_child_entries(self, file_id, path=None):
885
886
        inv, inv_file_id = self._unpack_file_id(file_id)
886
 
        return inv[inv_file_id].children.iteritems()
 
887
        return inv[inv_file_id].children.itervalues()
887
888
 
888
889
    @deprecated_method(deprecated_in((2, 5, 0)))
889
890
    def get_file_by_path(self, path):