~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Robert Collins
  • Date: 2007-03-01 06:19:44 UTC
  • mto: (2255.11.3 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070301061944-y1jw05ufqdpw4yx5
Update the Tree.filter_unversioned_files docstring to reflect what the existing implementations actually do, and change the WorkingTree4 implementation to match a newly created test for it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
        return self._dirstate
243
243
 
244
244
    def filter_unversioned_files(self, paths):
245
 
        """Filter out paths that are not versioned.
 
245
        """Filter out paths that are versioned.
246
246
 
247
247
        :return: set of paths.
248
248
        """
257
257
            dirname, basename = os.path.split(path.encode('utf8'))
258
258
            _, _, _, path_is_versioned = state._get_block_entry_index(
259
259
                dirname, basename, 0)
260
 
            if path_is_versioned:
 
260
            if not path_is_versioned:
261
261
                result.add(path)
262
262
        return result
263
263
 
1489
1489
                    all_versioned = False
1490
1490
                    break
1491
1491
            if not all_versioned:
1492
 
                raise errors.PathsNotVersionedError(paths)
 
1492
                raise errors.PathsNotVersionedError(specific_files)
1493
1493
        # -- remove redundancy in supplied specific_files to prevent over-scanning --
1494
1494
        search_specific_files = set()
1495
1495
        for path in specific_files:
1866
1866
                        new_executable = bool(
1867
1867
                            stat.S_ISREG(current_path_info[3].st_mode)
1868
1868
                            and stat.S_IEXEC & current_path_info[3].st_mode)
1869
 
                        yield (None, current_path_info[0], True,
1870
 
                               (False, False),
1871
 
                               (None, None),
1872
 
                               (None, current_path_info[1]),
1873
 
                               (None, current_path_info[2]),
1874
 
                               (None, new_executable))
 
1869
                        pass # unversioned file support not added to the
 
1870
                        # _iter_changes api yet - breaks status amongst other
 
1871
                        # things.
 
1872
#                        yield (None, current_path_info[0], True,
 
1873
#                               (False, False),
 
1874
#                               (None, None),
 
1875
#                               (None, current_path_info[1]),
 
1876
#                               (None, current_path_info[2]),
 
1877
#                               (None, new_executable))
1875
1878
                    elif current_path_info is None:
1876
1879
                        # no path is fine: the per entry code will handle it.
1877
1880
                        for result in _process_entry(current_entry, current_path_info):