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

  • Committer: Robert Collins
  • Date: 2007-08-22 00:00:26 UTC
  • mfrom: (2739 +trunk)
  • mto: (2592.3.96 repository)
  • mto: This revision was merged to the branch mainline in revision 2742.
  • Revision ID: robertc@robertcollins.net-20070822000026-kvufiqhlreokb1en
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
    def get_file_by_path(self, path):
226
226
        return self.get_file(self._inventory.path2id(path))
227
227
 
 
228
    def iter_files_bytes(self, desired_files):
 
229
        """Iterate through file contents.
 
230
 
 
231
        Files will not necessarily be returned in the order they occur in
 
232
        desired_files.  No specific order is guaranteed.
 
233
 
 
234
        Yields pairs of identifier, bytes_iterator.  identifier is an opaque
 
235
        value supplied by the caller as part of desired_files.  It should
 
236
        uniquely identify the file version in the caller's context.  (Examples:
 
237
        an index number or a TreeTransform trans_id.)
 
238
 
 
239
        bytes_iterator is an iterable of bytestrings for the file.  The
 
240
        kind of iterable and length of the bytestrings are unspecified, but for
 
241
        this implementation, it is a tuple containing a single bytestring with
 
242
        the complete text of the file.
 
243
 
 
244
        :param desired_files: a list of (file_id, identifier) pairs
 
245
        """
 
246
        for file_id, identifier in desired_files:
 
247
            # We wrap the string in a tuple so that we can return an iterable
 
248
            # of bytestrings.  (Technically, a bytestring is also an iterable
 
249
            # of bytestrings, but iterating through each character is not
 
250
            # performant.)
 
251
            cur_file = (self.get_file_text(file_id),)
 
252
            yield identifier, cur_file
 
253
 
228
254
    def get_symlink_target(self, file_id):
229
255
        """Get the target for a given file_id.
230
256
 
611
637
            return result
612
638
        return delta._compare_trees(self.source, self.target, want_unchanged,
613
639
            specific_files, include_root, extra_trees=extra_trees,
 
640
            require_versioned=require_versioned,
614
641
            want_unversioned=want_unversioned)
615
642
 
616
643
    def _iter_changes(self, include_unchanged=False,