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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from cStringIO import StringIO
20
19
 
21
 
from breezy import (
 
20
from . import (
22
21
    osutils,
23
22
    progress,
24
23
    trace,
25
 
)
26
 
from breezy.ui import ui_factory
27
 
from breezy.i18n import gettext
 
24
    )
 
25
from .i18n import gettext
 
26
from .sixish import (
 
27
    BytesIO,
 
28
    )
 
29
from .ui import ui_factory
28
30
 
29
31
class RenameMap(object):
30
32
    """Determine a mapping of renames."""
67
69
            for num, (file_id, contents) in enumerate(
68
70
                tree.iter_files_bytes(desired_files)):
69
71
                task.update(gettext('Calculating hashes'), num, len(file_ids))
70
 
                s = StringIO()
 
72
                s = BytesIO()
71
73
                s.writelines(contents)
72
74
                s.seek(0)
73
75
                self.add_edge_hashes(s.readlines(), file_id)