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

  • Committer: Jelmer Vernooij
  • Date: 2018-03-12 07:08:16 UTC
  • mto: (0.200.1846 work)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180312070816-p7s2l7fk3h82e8fm
Support directories in WorkingTree.extras.

Show diffs side-by-side

added added

removed removed

Lines of Context:
679
679
        """Yield all unversioned files in this WorkingTree.
680
680
        """
681
681
        with self.lock_read():
682
 
            return set(self._iter_files_recursive()) - set(self.index)
 
682
            for p in (set(self._iter_files_recursive(include_dirs=True)) - set(self.index)):
 
683
                try:
 
684
                    up = p.decode(osutils._fs_enc)
 
685
                except UnicodeDecodeError:
 
686
                    raise errors.BadFilenameEncoding(
 
687
                        p, osutils._fs_enc)
 
688
                if not self._has_dir(up):
 
689
                    yield up
683
690
 
684
691
    def flush(self):
685
692
        # TODO: Maybe this should only write on dirty ?
946
953
                    value = self.index[path]
947
954
                except KeyError:
948
955
                    value = None
949
 
                path = path.decode("utf-8")
 
956
                try:
 
957
                    path = path.decode("utf-8")
 
958
                except UnicodeDecodeError:
 
959
                    raise errors.BadFilenameEncoding(
 
960
                        path, osutils._fs_enc)
950
961
                kind = osutils.file_kind(self.abspath(path))
951
962
                parent, name = posixpath.split(path)
952
963
                for dir_path, dir_ie in self._add_missing_parent_ids(parent, dir_ids):