/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

Merge test-run support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import breezy
26
26
from . import (
27
 
    bedding,
 
27
    config,
28
28
    controldir,
29
29
    errors,
30
30
    osutils,
57
57
    # but sys.executable point to brz.exe itself)
58
58
    # however, sys.frozen exists if running from brz.exe
59
59
    # see http://www.py2exe.org/index.cgi/Py2exeEnvironment
60
 
    if getattr(sys, 'frozen', None) is None:  # if not brz.exe
 
60
    if getattr(sys, 'frozen', None) is None: # if not brz.exe
61
61
        to_file.write(sys.executable + ' ')
62
62
    else:
63
63
        # pythonXY.dll
70
70
 
71
71
    to_file.write("  Python standard library:" + ' ')
72
72
    to_file.write(os.path.dirname(os.__file__) + '\n')
73
 
    platform_str = platform.platform(aliased=1)
74
 
    if not isinstance(platform_str, text_type):
75
 
        platform_str = platform_str.decode('utf-8')
76
 
    to_file.write("  Platform: %s\n" % platform_str)
 
73
    to_file.write("  Platform: %s\n"
 
74
                  % platform.platform(aliased=1).decode('utf-8'))
77
75
    to_file.write("  breezy: ")
78
76
    if len(breezy.__path__) > 1:
79
77
        # print repr, which is a good enough way of making it clear it's
82
80
    else:
83
81
        to_file.write(breezy.__path__[0] + '\n')
84
82
    if show_config:
85
 
        config_dir = osutils.normpath(
86
 
            bedding.config_dir())  # use native slashes
 
83
        config_dir = osutils.normpath(config.config_dir())  # use native slashes
87
84
        if not isinstance(config_dir, text_type):
88
85
            config_dir = config_dir.decode(osutils.get_user_encoding())
89
86
        to_file.write("  Breezy configuration: %s\n" % (config_dir,))
94
91
        to_file.write(breezy.__copyright__ + '\n')
95
92
        to_file.write("https://www.breezy-vcs.org/\n")
96
93
        to_file.write('\n')
97
 
        to_file.write(
98
 
            "brz comes with ABSOLUTELY NO WARRANTY.  brz is free software, and\n")
99
 
        to_file.write(
100
 
            "you may use, modify and redistribute it under the terms of the GNU\n")
 
94
        to_file.write("brz comes with ABSOLUTELY NO WARRANTY.  brz is free software, and\n")
 
95
        to_file.write("you may use, modify and redistribute it under the terms of the GNU\n")
101
96
        to_file.write("General Public License version 2 or later.\n")
102
97
    to_file.write('\n')
103
98