~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

Merge with preview-changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    def iter_entries_by_dir(self, specific_file_ids=None):
177
177
        """Walk the tree in 'by_dir' order.
178
178
 
179
 
        This will yield each entry in the tree as a (path, entry) tuple. The
180
 
        order that they are yielded is: the contents of a directory are 
181
 
        preceeded by the parent of a directory, and all the contents of a 
182
 
        directory are grouped together.
 
179
        This will yield each entry in the tree as a (path, entry) tuple.
 
180
        The order that they are yielded is:
 
181
 
 
182
        Directories are walked in a depth-first lexicographical order,
 
183
        however, whenever a directory is reached, all of its direct child
 
184
        nodes are yielded in  lexicographical order before yielding the
 
185
        grandchildren.
 
186
 
 
187
        For example, in the tree::
 
188
 
 
189
           a/
 
190
             b/
 
191
               c
 
192
             d/
 
193
               e
 
194
           f/
 
195
             g
 
196
 
 
197
        The yield order would be::
 
198
          a, f, a/b, a/d, a/b/c, a/d/e, f/g
183
199
        """
184
200
        return self.inventory.iter_entries_by_dir(
185
201
            specific_file_ids=specific_file_ids)