Rev 435: Mark as compatible with 0.16. in file:///home/jelmer/bzr-svn/0.3/
Jelmer Vernooij
jelmer at samba.org
Mon Mar 19 16:14:41 GMT 2007
At file:///home/jelmer/bzr-svn/0.3/
------------------------------------------------------------
revno: 435
revision-id: jelmer at samba.org-20070319023001-rc2qdo3u0s2bcbvk
parent: jelmer at samba.org-20070319013749-bkub1tns29ynk3zu
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.3
timestamp: Mon 2007-03-19 03:30:01 +0100
message:
Mark as compatible with 0.16.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
=== modified file '__init__.py'
--- a/__init__.py 2007-03-13 09:40:12 +0000
+++ b/__init__.py 2007-03-19 02:30:01 +0000
@@ -23,26 +23,24 @@
import bzrlib
__version__ = '0.3.2'
-required_bzr_version = (0,15)
+compatible_bzr_versions = [(0,15),(0,16)]
def check_bzrlib_version(desired):
"""Check that bzrlib is compatible.
- If version is < desired version, assume incompatible.
- If version == desired version, assume completely compatible
- If version == desired version + 1, assume compatible, with deprecations
+ If version is < all compatible version, assume incompatible.
+ If version is compatible version + 1, assume compatible, with deprecations
Otherwise, assume incompatible.
"""
- desired_plus = (desired[0], desired[1]+1)
bzrlib_version = bzrlib.version_info[:2]
- if bzrlib_version == desired:
+ if bzrlib_version in desired:
return
try:
from bzrlib.trace import warning
except ImportError:
# get the message out any way we can
from warnings import warn as warning
- if bzrlib_version < desired:
+ if bzrlib_version < desired[0]:
warning('Installed bzr version %s is too old to be used with bzr-svn'
' %s.' % (bzrlib.__version__, __version__))
# Not using BzrNewError, because it may not exist.
@@ -51,7 +49,7 @@
warning('bzr-svn is not up to date with installed bzr version %s.'
' \nThere should be a newer version of bzr-svn available.'
% (bzrlib.__version__))
- if bzrlib_version != desired_plus:
+ if not (bzrlib_version[0], bzrlib_version[1]-1) in desired:
raise Exception, 'Version mismatch'
def check_subversion_version():
@@ -85,7 +83,7 @@
warning('Needs at least sqlite 3.3.x')
raise bzrlib.errors.BzrError("incompatible sqlite library")
-check_bzrlib_version(required_bzr_version)
+check_bzrlib_version(compatible_bzr_versions)
check_subversion_version()
check_pysqlite_version()
More information about the bazaar-commits
mailing list