/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

  • Committer: Andrew Bennetts
  • Date: 2008-09-08 12:59:00 UTC
  • mfrom: (3695 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080908125900-8ywtsr7jqyyatjz0
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
41
41
# releaselevel of 'dev' for unreleased under-development code.
42
42
 
43
 
version_info = (1, 4, 0, 'dev', 0)
44
 
 
45
 
# API compatibility version: bzrlib is currently API compatible with 0.18.
46
 
api_minimum_version = (0, 18, 0)
 
43
version_info = (1, 7, 0, 'dev', 0)
 
44
 
 
45
 
 
46
# API compatibility version: bzrlib is currently API compatible with 1.7.
 
47
api_minimum_version = (1, 7, 0)
 
48
 
47
49
 
48
50
def _format_version_tuple(version_info):
49
 
    """Turn a version number 5-tuple into a short string.
 
51
    """Turn a version number 3-tuple or 5-tuple into a short string.
50
52
 
51
53
    This format matches <http://docs.python.org/dist/meta-data.html>
52
54
    and the typical presentation used in Python output.
60
62
    1.2dev
61
63
    >>> print _format_version_tuple((1, 1, 1, 'candidate', 2))
62
64
    1.1.1rc2
 
65
    >>> print _format_version_tuple((1, 4, 0))
 
66
    1.4
63
67
    """
64
68
    if version_info[2] == 0:
65
69
        main_version = '%d.%d' % version_info[:2]
66
70
    else:
67
71
        main_version = '%d.%d.%d' % version_info[:3]
 
72
    if len(version_info) <= 3:
 
73
        return main_version
68
74
 
69
75
    __release_type = version_info[3]
70
76
    __sub = version_info[4]