/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: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

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
 
"""Report on version of brzlib"""
 
17
"""Report on version of breezy"""
18
18
 
19
19
from __future__ import absolute_import
20
20
 
22
22
import platform
23
23
import sys
24
24
 
25
 
import brzlib
26
 
from brzlib import (
 
25
import breezy
 
26
from breezy import (
27
27
    config,
28
28
    controldir,
29
29
    errors,
35
35
def show_version(show_config=True, show_copyright=True, to_file=None):
36
36
    if to_file is None:
37
37
        to_file = sys.stdout
38
 
    to_file.write("Breezy (brz) %s\n" % brzlib.__version__)
39
 
    # is brzlib itself in a branch?
 
38
    to_file.write("Breezy (brz) %s\n" % breezy.__version__)
 
39
    # is breezy itself in a branch?
40
40
    src_tree = _get_brz_source_tree()
41
41
    if src_tree:
42
42
        src_revision_id = src_tree.last_revision()
60
60
        python_dll = "python%d%d.dll" % sys.version_info[:2]
61
61
        to_file.write(os.path.join(basedir, python_dll) + ' ')
62
62
    # and now version of python interpreter
63
 
    to_file.write(brzlib._format_version_tuple(sys.version_info))
 
63
    to_file.write(breezy._format_version_tuple(sys.version_info))
64
64
    to_file.write('\n')
65
65
 
66
66
    to_file.write("  Python standard library:" + ' ')
67
67
    to_file.write(os.path.dirname(os.__file__) + '\n')
68
68
    to_file.write("  Platform: %s\n"
69
69
                  % platform.platform(aliased=1).decode('utf-8'))
70
 
    to_file.write("  brzlib: ")
71
 
    if len(brzlib.__path__) > 1:
 
70
    to_file.write("  breezy: ")
 
71
    if len(breezy.__path__) > 1:
72
72
        # print repr, which is a good enough way of making it clear it's
73
73
        # more than one element (eg ['/foo/bar', '/foo/brz'])
74
 
        to_file.write(repr(brzlib.__path__) + '\n')
 
74
        to_file.write(repr(breezy.__path__) + '\n')
75
75
    else:
76
 
        to_file.write(brzlib.__path__[0] + '\n')
 
76
        to_file.write(breezy.__path__[0] + '\n')
77
77
    if show_config:
78
78
        config_dir = osutils.normpath(config.config_dir())  # use native slashes
79
79
        if not isinstance(config_dir, unicode):
83
83
        to_file.write(trace._brz_log_filename + '\n')
84
84
    if show_copyright:
85
85
        to_file.write('\n')
86
 
        to_file.write(brzlib.__copyright__ + '\n')
 
86
        to_file.write(breezy.__copyright__ + '\n')
87
87
        to_file.write("http://bazaar.canonical.com/\n")
88
88
        to_file.write('\n')
89
89
        to_file.write("brz comes with ABSOLUTELY NO WARRANTY.  brz is free software, and\n")