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

  • Committer: Jelmer Vernooij
  • Date: 2020-04-05 19:11:34 UTC
  • mto: (7490.7.16 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200405191134-0aebh8ikiwygxma5
Populate the .gitignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Report on version of breezy"""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
import os
20
22
import platform
21
23
import sys
28
30
    osutils,
29
31
    trace,
30
32
    )
 
33
from .sixish import text_type
31
34
 
32
35
 
33
36
def show_version(show_config=True, show_copyright=True, to_file=None):
68
71
    to_file.write("  Python standard library:" + ' ')
69
72
    to_file.write(os.path.dirname(os.__file__) + '\n')
70
73
    platform_str = platform.platform(aliased=1)
71
 
    if not isinstance(platform_str, str):
 
74
    if not isinstance(platform_str, text_type):
72
75
        platform_str = platform_str.decode('utf-8')
73
76
    to_file.write("  Platform: %s\n" % platform_str)
74
77
    to_file.write("  breezy: ")
81
84
    if show_config:
82
85
        config_dir = osutils.normpath(
83
86
            bedding.config_dir())  # use native slashes
84
 
        if not isinstance(config_dir, str):
 
87
        if not isinstance(config_dir, text_type):
85
88
            config_dir = config_dir.decode(osutils.get_user_encoding())
86
89
        to_file.write("  Breezy configuration: %s\n" % (config_dir,))
87
90
        to_file.write("  Breezy log file: ")