~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Martin Pool
  • Date: 2009-09-14 01:48:28 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4688.
  • Revision ID: mbp@sourcefrog.net-20090914014828-ydr9rlkdfq2sv57z
Merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
        :param tree: The tree that will be transformed, but not necessarily
86
86
            the output tree.
87
 
        :param pb: A ProgressBar indicating how much progress is being made
 
87
        :param pb: A ProgressTask indicating how much progress is being made
88
88
        :param case_sensitive: If True, the target of the transform is
89
89
            case sensitive, not just case preserving.
90
90
        """
1790
1790
            if self._transform.final_file_id(trans_id) is None:
1791
1791
                yield self._final_paths._determine_path(trans_id)
1792
1792
 
1793
 
    def _make_inv_entries(self, ordered_entries, specific_file_ids=None):
 
1793
    def _make_inv_entries(self, ordered_entries, specific_file_ids=None,
 
1794
        yield_parents=False):
1794
1795
        for trans_id, parent_file_id in ordered_entries:
1795
1796
            file_id = self._transform.final_file_id(trans_id)
1796
1797
            if file_id is None:
1822
1823
                ordered_ids.append((trans_id, parent_file_id))
1823
1824
        return ordered_ids
1824
1825
 
1825
 
    def iter_entries_by_dir(self, specific_file_ids=None):
 
1826
    def iter_entries_by_dir(self, specific_file_ids=None, yield_parents=False):
1826
1827
        # This may not be a maximally efficient implementation, but it is
1827
1828
        # reasonably straightforward.  An implementation that grafts the
1828
1829
        # TreeTransform changes onto the tree's iter_entries_by_dir results
1830
1831
        # position.
1831
1832
        ordered_ids = self._list_files_by_dir()
1832
1833
        for entry, trans_id in self._make_inv_entries(ordered_ids,
1833
 
                                                      specific_file_ids):
 
1834
            specific_file_ids, yield_parents=yield_parents):
1834
1835
            yield unicode(self._final_paths.get_path(trans_id)), entry
1835
1836
 
1836
1837
    def _iter_entries_for_dir(self, dir_path):