/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/git/tree.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-03 00:15:59 UTC
  • mto: This revision was merged to the branch mainline in revision 7027.
  • Revision ID: jelmer@jelmer.uk-20180703001559-crogxh6en8s4d83b
Fix remaining git tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
                    posixpath.basename(from_dir), mode, hexsha)
404
404
        if from_dir != "" or include_root:
405
405
            yield (from_dir, "V", root_ie.kind, root_ie.file_id, root_ie)
406
 
        todo = set()
 
406
        todo = []
407
407
        if root_ie.kind == 'directory':
408
 
            todo.add((store, from_dir.encode("utf-8"), hexsha, root_ie.file_id))
 
408
            todo.append((store, from_dir.encode("utf-8"), hexsha, root_ie.file_id))
409
409
        while todo:
410
410
            (store, path, hexsha, parent_id) = todo.pop()
411
411
            tree = store[hexsha]
416
416
                if stat.S_ISDIR(mode):
417
417
                    ie = self._get_dir_ie(child_path, parent_id)
418
418
                    if recursive:
419
 
                        todo.add((store, child_path, hexsha, ie.file_id))
 
419
                        todo.append((store, child_path, hexsha, ie.file_id))
420
420
                else:
421
421
                    ie = self._get_file_ie(store, child_path, name, mode, hexsha, parent_id)
422
422
                yield child_path.decode('utf-8'), "V", ie.kind, ie.file_id, ie