/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 bzrlib/transform.py

  • Committer: Robert Collins
  • Date: 2009-08-26 03:20:32 UTC
  • mfrom: (4637 +trunk)
  • mto: (4634.6.2 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: robertc@robertcollins.net-20090826032032-mx5kiog3eihaoy13
Merge and cherrypick outstanding 2.0 relevant patches from bzr.dev: Up to rev
4637, then 4639,4641,4643,4646,4649,4650,4651. (Robert Collins)

Log messages of the incorporated fixes:

revno: 4651 [merge]
  (robertc) Enable commit via record_iter_changes for specific file
        comments. (Robert Collins)

revno: 4650 [merge]
  Fix shelve on windows. (Robert Collins, #305006)

revno: 4649 [merge]
  (robertc) Make iter_changes produce output that is always safe to
        generate inventory deltas of in the same direction as the
        changes. (Robert Collins, #347649)

revno: 4646 [merge]
  (mbp) developer documentation about content filtering

revno: 4643 [merge]
  (mbp) small tweaks to release documentation

revno: 4641 [merge]
  (abentley) Shelve will not remove tree root.

revno: 4639 [merge]
  (andrew) Fix 'Revision ... not present' errors when upgrading stacked
        branches.

revno: 4637 [merge]
  Fix upgrade of branches in repositories.

revno: 4636 [merge]
  (mbp) fix crash formatting CannotBindAddress

revno: 4635 [merge]
  (robertc) Fix many locking errors on windows due to a small bug in
        merge.transform_tree. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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):