Rev 424: Allow bzr-gtk and Bazaar versions to be out of sync. No longer warn about in file:///data/jelmer/bzr-gtk/noversioncheck/

Jelmer Vernooij jelmer at samba.org
Tue Jan 8 19:46:48 GMT 2008


At file:///data/jelmer/bzr-gtk/noversioncheck/

------------------------------------------------------------
revno: 424
revision-id:jelmer at samba.org-20080108193939-kl3lj1lna30f6gdx
parent: garyvdm at gmail.com-20071222125141-mb3ql3sgcqaoyt1z
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: noversioncheck
timestamp: Tue 2008-01-08 20:39:39 +0100
message:
  Allow bzr-gtk and Bazaar versions to be out of sync. No longer warn about 
  newer versions of Bazaar, on the assumption the API is sufficiently stable now.
modified:
  NEWS                           news-20070325173539-3va57o99cz3o57xe-1
  __init__.py                    __init__.py-20060519165329-a1fd52c8a829fcd5
=== modified file 'NEWS'
--- a/NEWS	2007-12-20 23:43:57 +0000
+++ b/NEWS	2008-01-08 19:39:39 +0000
@@ -9,6 +9,12 @@
   * Make viz not throw errors when there are 0 commits. (#173698, Gary van der
     Merwe)
 
+ FEATURES
+ 
+  * Only check for old Bazaar versions that are known to be incompatible and 
+    no longer warn about newer (unknown) versions of Bazaar, on the assumption
+	the API is sufficiently stable now. (Jelmer Vernooij)
+
  INTERNALS
 
   * Refactored the revisionview. (Daniel Schierbeck)

=== modified file '__init__.py'
--- a/__init__.py	2007-12-10 16:01:51 +0000
+++ b/__init__.py	2008-01-08 19:39:39 +0000
@@ -44,19 +44,14 @@
     version_string = '%d.%d.%d%s%d' % version_info
 __version__ = version_string
 
+required_bzrlib = (1, 0)
+
 def check_bzrlib_version(desired):
     """Check that bzrlib is compatible.
 
     If version is < bzr-gtk version, assume incompatible.
-    If version == bzr-gtk version, assume completely compatible
-    If version == bzr-gtk 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 or (bzrlib_version == desired_plus and
-                                     bzrlib.version_info[3] == 'dev'):
-        return
     try:
         from bzrlib.trace import warning
     except ImportError:
@@ -67,14 +62,10 @@
         warning('Installed Bazaar version %s is too old to be used with bzr-gtk'
                 ' %s.' % (bzrlib.__version__, __version__))
         raise BzrError('Version mismatch: %r, %r' % (version_info, bzrlib.version_info) )
-    else:
-        warning('bzr-gtk is not up to date with installed bzr version %s.'
-                ' \nThere should be a newer version available, e.g. %i.%i.' 
-                % (bzrlib.__version__, bzrlib_version[0], bzrlib_version[1]))
 
 
 if version_info[2] == "final":
-    check_bzrlib_version(version_info[:2])
+    check_bzrlib_version(required_bzrlib)
 
 from bzrlib.trace import warning
 if __name__ != 'bzrlib.plugins.gtk':




More information about the bazaar-commits mailing list