/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 bzrlib/__init__.py

merge bzr.dev r4154

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
51
51
# releaselevel of 'dev' for unreleased under-development code.
52
52
 
53
 
version_info = (1, 13, 0, 'dev', 0)
 
53
version_info = (1, 14, 0, 'dev', 0)
54
54
 
55
55
 
56
56
# API compatibility version: bzrlib is currently API compatible with 1.13.
58
58
 
59
59
 
60
60
def _format_version_tuple(version_info):
61
 
    """Turn a version number 3-tuple or 5-tuple into a short string.
 
61
    """Turn a version number 2, 3 or 5-tuple into a short string.
62
62
 
63
63
    This format matches <http://docs.python.org/dist/meta-data.html>
64
64
    and the typical presentation used in Python output.
74
74
    1.1.1rc2
75
75
    >>> print _format_version_tuple((1, 4, 0))
76
76
    1.4
 
77
    >>> print _format_version_tuple((1, 4))
 
78
    1.4
77
79
    >>> print _format_version_tuple((1, 4, 0, 'wibble', 0))
78
80
    Traceback (most recent call last):
79
81
    ...
80
82
    ValueError: version_info (1, 4, 0, 'wibble', 0) not valid
81
83
    """
82
 
    if version_info[2] == 0:
 
84
    if len(version_info) == 2 or version_info[2] == 0:
83
85
        main_version = '%d.%d' % version_info[:2]
84
86
    else:
85
87
        main_version = '%d.%d.%d' % version_info[:3]
104
106
    version_string = '%d.%d.%d.%s.%d' % version_info
105
107
    return main_version + sub_string
106
108
 
 
109
 
107
110
__version__ = _format_version_tuple(version_info)
108
111
version_string = __version__
109
112