/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: 2017-10-26 11:10:38 UTC
  • mfrom: (6791.2.7 python3)
  • Revision ID: jelmer@jelmer.uk-20171026111038-cvils4aykn7ffcju
Merge lp:~jelmer/brz/fix-imports.

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
45
46
 
46
47
 
47
48
CONFLICT_SUFFIXES = ('.THIS', '.BASE', '.OTHER')
76
77
                    continue
77
78
                self.outf.write(conflict.path + '\n')
78
79
            else:
79
 
                self.outf.write(unicode(conflict) + '\n')
 
80
                self.outf.write(text_type(conflict) + '\n')
80
81
 
81
82
 
82
83
resolve_action_registry = registry.Registry()
154
155
                        len(resolved))
155
156
                    trace.note(gettext('Remaining conflicts:'))
156
157
                    for conflict in un_resolved:
157
 
                        trace.note(unicode(conflict))
 
158
                        trace.note(text_type(conflict))
158
159
                    return 1
159
160
                else:
160
161
                    trace.note(gettext('All conflicts resolved.'))
295
296
    def to_strings(self):
296
297
        """Generate strings for the provided conflicts"""
297
298
        for conflict in self:
298
 
            yield unicode(conflict)
 
299
            yield text_type(conflict)
299
300
 
300
301
    def remove_files(self, tree):
301
302
        """Remove the THIS, BASE and OTHER files for listed conflicts"""
368
369
        self.path = path
369
370
        # the factory blindly transfers the Stanza values to __init__ and
370
371
        # Stanza is purely a Unicode api.
371
 
        if isinstance(file_id, unicode):
 
372
        if isinstance(file_id, text_type):
372
373
            file_id = cache_utf8.encode(file_id)
373
374
        self.file_id = osutils.safe_file_id(file_id)
374
375
 
713
714
        self.conflict_path = conflict_path
714
715
        # the factory blindly transfers the Stanza values to __init__,
715
716
        # so they can be unicode.
716
 
        if isinstance(conflict_file_id, unicode):
 
717
        if isinstance(conflict_file_id, text_type):
717
718
            conflict_file_id = cache_utf8.encode(conflict_file_id)
718
719
        self.conflict_file_id = osutils.safe_file_id(conflict_file_id)
719
720