~jelmer/loggerhead/breezy-compat

« back to all changes in this revision

Viewing changes to loggerhead/controllers/diff_ui.py

  • Committer: Colin Watson
  • Date: 2019-09-19 08:10:36 UTC
  • mfrom: (491.2.62 breezy)
  • Revision ID: cjwatson@canonical.com-20190919081036-q1symc2h2iedtlh3
[r=cjwatson] Switch loggerhead over to using the Breezy rather than Bazaar APIs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335  USA
17
17
#
18
18
 
19
 
from cStringIO import StringIO
 
19
from io import BytesIO
20
20
import time
21
21
 
22
22
from paste.request import path_info_pop, parse_querystring
23
23
 
24
 
from bzrlib.diff import show_diff_trees
25
 
from bzrlib.revision import NULL_REVISION
 
24
from breezy.diff import show_diff_trees
 
25
from breezy.revision import NULL_REVISION
26
26
 
27
 
from loggerhead.controllers import TemplatedBranchView
 
27
from ..controllers import TemplatedBranchView
28
28
 
29
29
 
30
30
class DiffUI(TemplatedBranchView):
71
71
        revtree1 = repo.revision_tree(revid_to)
72
72
        revtree2 = repo.revision_tree(revid_from)
73
73
 
74
 
        diff_content_stream = StringIO()
 
74
        diff_content_stream = BytesIO()
75
75
        show_diff_trees(revtree1, revtree2, diff_content_stream,
76
76
                        old_label='', new_label='', context=numlines)
77
77