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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-14 19:47:11 UTC
  • mfrom: (7027.4.12 python3-blackbox)
  • Revision ID: breezy.the.bot@gmail.com-20180714194711-h73vd0gzphiab6vf
Change run_bzr to use StringIOWithEncoding for stderr and stdout on python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-blackbox/+merge/349090

Show diffs side-by-side

added added

removed removed

Lines of Context:
946
946
                file = BytesIO()
947
947
                stat_val = os.stat_result(
948
948
                    (stat.S_IFREG | 0o644, 0, 0, 0, 0, 0, 0, 0, 0, 0))
949
 
            blob.set_raw_string(file.read())
 
949
            with file:
 
950
                blob.set_raw_string(file.read())
950
951
            # Add object to the repository if it didn't exist yet
951
952
            if not blob.id in self.store:
952
953
                self.store.add_object(blob)