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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-24 12:34:34 UTC
  • mfrom: (6874.2.9 iter-files-bytes)
  • Revision ID: breezy.the.bot@gmail.com-20180324123434-zogy2xskr96vv5xm
Change Tree.iter_files_bytes() to take a (path, identifier) list rather than a (file_id, identifier) list.

Merged from https://code.launchpad.net/~jelmer/brz/iter-files-bytes/+merge/340578

Show diffs side-by-side

added added

removed removed

Lines of Context:
438
438
        this implementation, it is a tuple containing a single bytestring with
439
439
        the complete text of the file.
440
440
 
441
 
        :param desired_files: a list of (file_id, identifier) pairs
 
441
        :param desired_files: a list of (path, identifier) pairs
442
442
        """
443
 
        for file_id, identifier in desired_files:
 
443
        for path, identifier in desired_files:
444
444
            # We wrap the string in a tuple so that we can return an iterable
445
445
            # of bytestrings.  (Technically, a bytestring is also an iterable
446
446
            # of bytestrings, but iterating through each character is not
447
447
            # performant.)
448
 
            # TODO(jelmer): Pass paths into iter_files_bytes
449
 
            path = self.id2path(file_id)
450
 
            cur_file = (self.get_file_text(path, file_id),)
 
448
            cur_file = (self.get_file_text(path),)
451
449
            yield identifier, cur_file
452
450
 
453
451
    def get_symlink_target(self, path, file_id=None):