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

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    option,
43
43
    registry,
44
44
    )
45
 
from .sixish import text_type
46
45
 
47
46
 
48
47
CONFLICT_SUFFIXES = ('.THIS', '.BASE', '.OTHER')
77
76
                    continue
78
77
                self.outf.write(conflict.path + '\n')
79
78
            else:
80
 
                self.outf.write(text_type(conflict) + '\n')
 
79
                self.outf.write(str(conflict) + '\n')
81
80
 
82
81
 
83
82
resolve_action_registry = registry.Registry()
154
153
                    before - after)
155
154
                trace.note(gettext('Remaining conflicts:'))
156
155
                for conflict in tree.conflicts():
157
 
                    trace.note(text_type(conflict))
 
156
                    trace.note(str(conflict))
158
157
                return 1
159
158
            else:
160
159
                trace.note(gettext('All conflicts resolved.'))
289
288
    def to_strings(self):
290
289
        """Generate strings for the provided conflicts"""
291
290
        for conflict in self:
292
 
            yield text_type(conflict)
 
291
            yield str(conflict)
293
292
 
294
293
    def remove_files(self, tree):
295
294
        """Remove the THIS, BASE and OTHER files for listed conflicts"""
362
361
        self.path = path
363
362
        # the factory blindly transfers the Stanza values to __init__ and
364
363
        # Stanza is purely a Unicode api.
365
 
        if isinstance(file_id, text_type):
 
364
        if isinstance(file_id, str):
366
365
            file_id = cache_utf8.encode(file_id)
367
366
        self.file_id = osutils.safe_file_id(file_id)
368
367
 
736
735
        self.conflict_path = conflict_path
737
736
        # the factory blindly transfers the Stanza values to __init__,
738
737
        # so they can be unicode.
739
 
        if isinstance(conflict_file_id, text_type):
 
738
        if isinstance(conflict_file_id, str):
740
739
            conflict_file_id = cache_utf8.encode(conflict_file_id)
741
740
        self.conflict_file_id = osutils.safe_file_id(conflict_file_id)
742
741