/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/git/workingtree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-21 19:51:52 UTC
  • mfrom: (7143.19.8 namedtuple-list-files)
  • Revision ID: breezy.the.bot@gmail.com-20181121195152-ax5zwiz08bj4x6tc
Simplify the iterator for Tree.list_files() to exclude file kind and file_id.

Merged from https://code.launchpad.net/~jelmer/brz/namedtuple-list-files/+merge/358354

Show diffs side-by-side

added added

removed removed

Lines of Context:
770
770
        with self.lock_read():
771
771
            root_ie = self._get_dir_ie(u"", None)
772
772
            if include_root and not from_dir:
773
 
                yield "", "V", root_ie.kind, root_ie.file_id, root_ie
 
773
                yield "", "V", root_ie.kind, root_ie
774
774
            dir_ids[u""] = root_ie.file_id
775
775
            if recursive:
776
776
                path_iterator = sorted(
806
806
                        if self._has_dir(encoded_path):
807
807
                            ie = self._get_dir_ie(path, self.path2id(path))
808
808
                            status = "V"
809
 
                            file_id = ie.file_id
810
809
                        elif self.is_ignored(path):
811
810
                            status = "I"
812
811
                            ie = fk_entries[kind]()
813
 
                            file_id = None
814
812
                        else:
815
813
                            status = "?"
816
814
                            ie = fk_entries[kind]()
817
 
                            file_id = None
818
 
                        yield (
819
 
                            posixpath.relpath(path, from_dir), status, kind,
820
 
                            file_id, ie)
 
815
                        yield (posixpath.relpath(path, from_dir), status, kind,
 
816
                               ie)
821
817
                    continue
822
818
                if value is not None:
823
819
                    ie = self._get_file_ie(name, path, value, dir_ids[parent])
824
 
                    yield (posixpath.relpath(path, from_dir), "V", ie.kind,
825
 
                           ie.file_id, ie)
 
820
                    yield (posixpath.relpath(path, from_dir), "V", ie.kind, ie)
826
821
                else:
827
822
                    ie = fk_entries[kind]()
828
 
                    yield (posixpath.relpath(path, from_dir), ("I" if
829
 
                                                               self.is_ignored(path) else "?"), kind, None, ie)
 
823
                    yield (posixpath.relpath(path, from_dir),
 
824
                           ("I" if self.is_ignored(path) else "?"), kind, ie)
830
825
 
831
826
    def all_file_ids(self):
832
827
        raise errors.UnsupportedOperation(self.all_file_ids, self)