~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Aaron Bentley
  • Date: 2006-08-16 19:13:00 UTC
  • mfrom: (1934 +trunk)
  • mto: (1910.2.43 format-bumps)
  • mto: This revision was merged to the branch mainline in revision 1935.
  • Revision ID: abentley@panoramicfeedback.com-20060816191300-045772b26b975d1c
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
del locale
34
34
 
35
35
__copyright__ = "Copyright 2005, 2006 Canonical Development Ltd."
36
 
__version__ = version_string = '0.9'
37
36
 
38
37
# same format as sys.version_info: "A tuple containing the five components of
39
38
# the version number: major, minor, micro, releaselevel, and serial. All
42
41
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
43
42
# releaselevel of 'dev' for unreleased under-development code.
44
43
 
45
 
version_info = (0, 9, 0, 'dev', 0)
 
44
version_info = (0, 10, 0, 'dev', 0)
46
45
 
47
46
if version_info[3] == 'final':
48
47
    version_string = '%d.%d.%d' % version_info[:3]
61
60
                    'Consider using bzrlib.ignores.add_unique_user_ignores'
62
61
                    ' or bzrlib.ignores.add_runtime_ignores')
63
62
 
64
 
 
65
 
@deprecated_function(zero_seven)
66
 
def get_bzr_revision():
67
 
    """If bzr is run from a branch, return (revno,revid) or None."""
68
 
    import bzrlib.errors
69
 
    from bzrlib.branch import Branch
70
 
    
71
 
    try:
72
 
        branch = Branch.open(os.path.dirname(__path__[0]))
73
 
        rh = branch.revision_history()
74
 
        if rh:
75
 
            return len(rh), rh[-1]
76
 
        else:
77
 
            return None
78
 
    except bzrlib.errors.BzrError:
79
 
        return None
80
 
    
81
63
def test_suite():
82
64
    import tests
83
65
    return tests.test_suite()