/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: Martin Pool
  • Date: 2008-05-27 03:00:53 UTC
  • mfrom: (3452 +trunk)
  • mto: (3724.1.1 lock-hooks)
  • mto: This revision was merged to the branch mainline in revision 3730.
  • Revision ID: mbp@sourcefrog.net-20080527030053-0mct6dypek0ysjc3
merge trunk

Show diffs side-by-side

added added

removed removed

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