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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-05-15 18:47:57 UTC
  • mfrom: (6964.2.7 python3-git)
  • Revision ID: breezy.the.bot@gmail.com-20180515184757-xozniaj9gztgtom8
Port some of brz-git to python3.

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    get_object_store,
45
45
    )
46
46
 
47
 
from cStringIO import StringIO
 
47
from io import BytesIO
48
48
from dulwich import (
49
49
    __version__ as dulwich_version,
50
50
    )
131
131
 
132
132
    @classmethod
133
133
    def _generate_commit(cls, repository, revision_id, num, total):
134
 
        s = StringIO()
 
134
        s = BytesIO()
135
135
        store = get_object_store(repository)
136
136
        with store.lock_read():
137
137
            commit = store[store._lookup_revision_sha1(revision_id)]
142
142
            lhs_parent = _mod_revision.NULL_REVISION
143
143
        tree_1 = repository.revision_tree(lhs_parent)
144
144
        tree_2 = repository.revision_tree(revision_id)
145
 
        contents = StringIO()
 
145
        contents = BytesIO()
146
146
        differ = GitDiffTree.from_trees_options(tree_1, tree_2,
147
147
                contents, 'utf8', None, 'a/', 'b/', None)
148
148
        differ.show_diff(None, None)