/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/revisionspec.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:
37
37
    registry,
38
38
    trace,
39
39
    )
40
 
from .sixish import (
41
 
    text_type,
42
 
    )
43
40
 
44
41
 
45
42
class RevisionInfo(object):
160
157
        """
161
158
        if spec is None:
162
159
            return RevisionSpec(None, _internal=True)
163
 
        if not isinstance(spec, (str, text_type)):
 
160
        if not isinstance(spec, str):
164
161
            raise TypeError("revision spec needs to be text")
165
162
        match = revspec_registry.get_prefix(spec)
166
163
        if match is not None:
471
468
        # self.spec comes straight from parsing the command line arguments,
472
469
        # so we expect it to be a Unicode string. Switch it to the internal
473
470
        # representation.
474
 
        if isinstance(self.spec, text_type):
 
471
        if isinstance(self.spec, str):
475
472
            return cache_utf8.encode(self.spec)
476
473
        return self.spec
477
474