/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: Vincent Ladeuil
  • Date: 2008-05-08 21:22:06 UTC
  • mfrom: (3417 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3418.
  • Revision ID: v.ladeuil+lp@free.fr-20080508212206-kwlteu651izgs5we
merge bzr.dev to fix conflicts in NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
version_info = (1, 5, 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]