/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-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
 
20
18
from .lazy_import import lazy_import
21
19
lazy_import(globals(), """
37
35
    registry,
38
36
    trace,
39
37
    )
40
 
from .sixish import (
41
 
    text_type,
42
 
    )
43
38
 
44
39
 
45
40
class RevisionInfo(object):
160
155
        """
161
156
        if spec is None:
162
157
            return RevisionSpec(None, _internal=True)
163
 
        if not isinstance(spec, (str, text_type)):
 
158
        if not isinstance(spec, str):
164
159
            raise TypeError("revision spec needs to be text")
165
160
        match = revspec_registry.get_prefix(spec)
166
161
        if match is not None:
471
466
        # self.spec comes straight from parsing the command line arguments,
472
467
        # so we expect it to be a Unicode string. Switch it to the internal
473
468
        # representation.
474
 
        if isinstance(self.spec, text_type):
 
469
        if isinstance(self.spec, str):
475
470
            return cache_utf8.encode(self.spec)
476
471
        return self.spec
477
472