/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/bundle/bundle_data.py

  • Committer: Jelmer Vernooij
  • Date: 2018-10-30 02:36:00 UTC
  • mto: This revision was merged to the branch mainline in revision 7170.
  • Revision ID: jelmer@jelmer.uk-20181030023600-akhcvlhwce4bcij1
Fix some bundle tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
618
618
 
619
619
    def get_file(self, path):
620
620
        """Return a file-like object containing the new contents of the
621
 
        file given by path.
 
621
        file given by file_id.
622
622
 
623
623
        TODO:   It might be nice if this actually generated an entry
624
624
                in the text-store, so that the file contents would
680
680
        old_path = self.old_path(path)
681
681
        return self.base_tree.get_file_revision(old_path)
682
682
 
683
 
    def get_size_and_sha1(self, new_path):
 
683
    def get_size_and_sha1(self, new_path, file_id=None):
684
684
        """Return the size and sha1 hash of the given file id.
685
685
        If the file was not locally modified, this is extracted
686
686
        from the base_tree. Rather than re-reading the file.
728
728
            ie.revision = revision_id
729
729
 
730
730
            if kind == 'file':
731
 
                ie.text_size, ie.text_sha1 = self.get_size_and_sha1(
732
 
                        path)
 
731
                ie.text_size, ie.text_sha1 = self.get_size_and_sha1(path)
733
732
                if ie.text_size is None:
734
733
                    raise BzrError(
735
734
                        'Got a text_size of None for file_id %r' % file_id)