/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: Jelmer Vernooij
  • Date: 2018-11-19 23:04:59 UTC
  • mto: This revision was merged to the branch mainline in revision 7202.
  • Revision ID: jelmer@jelmer.uk-20181119230459-jltrwuvrufj4cc6a
Don't report empty directories as changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
535
535
                    except UnicodeDecodeError:
536
536
                        raise errors.BadFilenameEncoding(
537
537
                            relpath, osutils._fs_enc)
538
 
                if not self._has_dir(relpath):
539
 
                    dirnames.remove(name)
 
538
                    if not self._has_dir(relpath):
 
539
                        dirnames.remove(name)
540
540
            for name in filenames:
541
541
                if not self.mapping.is_special_file(name):
542
542
                    yp = os.path.join(dir_relpath, name)
550
550
        """Yield all unversioned files in this WorkingTree.
551
551
        """
552
552
        with self.lock_read():
553
 
            index_paths = set([p.decode('utf-8')
554
 
                               for p, i in self._recurse_index_entries()])
555
 
            all_paths = set(self._iter_files_recursive(include_dirs=True))
556
 
            for p in (all_paths - index_paths):
557
 
                if not self._has_dir(p.encode('utf-8')):
558
 
                    yield p
 
553
            index_paths = set(
 
554
                [p.decode('utf-8') for p, i in self._recurse_index_entries()])
 
555
            all_paths = set(self._iter_files_recursive(include_dirs=False))
 
556
            return iter(all_paths - index_paths)
559
557
 
560
558
    def _gather_kinds(self, files, kinds):
561
559
        """See MutableTree._gather_kinds."""