Rev 1953: Merge 0.4. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Thu Oct 9 12:38:26 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1953
revision-id: jelmer at samba.org-20081009113820-i47gu2pea7041lnt
parent: jelmer at samba.org-20081006201606-nexwcwvsw14qohly
parent: jelmer at samba.org-20081008023159-mn6udtwarqfpyrre
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2008-10-09 13:38:20 +0200
message:
  Merge 0.4.
modified:
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
  subvertpy/setup.py             setup.py-20060502115218-86950492da22353f
  tests/test_errors.py           test_errors.py-20070129114605-ban03f32t6ja14ez-1
    ------------------------------------------------------------
    revno: 1669.1.54
    revision-id: jelmer at samba.org-20081008023159-mn6udtwarqfpyrre
    parent: jelmer at samba.org-20080930031022-prh9bagme9f54b3k
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-10-08 04:31:59 +0200
    message:
      Use new bzrlib.api functions.
    modified:
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
    ------------------------------------------------------------
    revno: 1669.1.53
    revision-id: jelmer at samba.org-20080930031022-prh9bagme9f54b3k
    parent: jelmer at samba.org-20080930025748-g055tkmk8384qzhw
    parent: jelmer at samba.org-20080924220240-vk9pdeziichjnxjt
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-09-30 05:10:22 +0200
    message:
      merge 0.4.
    modified:
      setup.py                       setup.py-20060502115218-86950492da22353f
        ------------------------------------------------------------
        revno: 1669.6.1
        revision-id: jelmer at samba.org-20080924220240-vk9pdeziichjnxjt
        parent: jelmer at samba.org-20080924160138-uvnoloi6cvo72y1c
        parent: bahamut at jfroy.apple.com-20080924215514-rqbr27uraqlut3ex
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Thu 2008-09-25 00:02:40 +0200
        message:
          Merge fix for properly removing check file.
        modified:
          setup.py                       setup.py-20060502115218-86950492da22353f
        ------------------------------------------------------------
        revno: 1669.5.4
        revision-id: bahamut at jfroy.apple.com-20080924215514-rqbr27uraqlut3ex
        parent: bahamut at jfroy.apple.com-20080924214809-qchas21aoxwnjew9
        committer: Jean-Francois Roy <bahamut at jfroy.apple.com>
        branch nick: keychain-check-dev
        timestamp: Wed 2008-09-24 14:55:14 -0700
        message:
          - Delete the temporary program file created by the keychain authentication provider check.
        modified:
          setup.py                       setup.py-20060502115218-86950492da22353f
        ------------------------------------------------------------
        revno: 1669.5.3
        revision-id: bahamut at jfroy.apple.com-20080924214809-qchas21aoxwnjew9
        parent: bahamut at macstorm.org-20080921220000-tboft1k0cm9d3j6o
        parent: jelmer at samba.org-20080924160138-uvnoloi6cvo72y1c
        committer: Jean-Francois Roy <bahamut at jfroy.apple.com>
        branch nick: keychain-check-dev
        timestamp: Wed 2008-09-24 14:48:09 -0700
        message:
          - Merge from 0.4 TOT.
        removed:
          keychain_provider_check.c      keychain_provider_ch-20080921215437-sw04velxau7v3fp8-1
        modified:
          AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
          FAQ                            faq-20070910195147-p9u38s9wplds2d4o-1
          NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
          __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
          ra.c                           ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
          setup.py                       setup.py-20060502115218-86950492da22353f
    ------------------------------------------------------------
    revno: 1669.1.52
    revision-id: jelmer at samba.org-20080930025748-g055tkmk8384qzhw
    parent: jelmer at samba.org-20080924160138-uvnoloi6cvo72y1c
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-09-30 04:57:48 +0200
    message:
      fix double handling of error code.
    modified:
      errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
      tests/test_errors.py           test_errors.py-20070129114605-ban03f32t6ja14ez-1
=== modified file '__init__.py'
--- a/__init__.py	2008-10-06 17:57:29 +0000
+++ b/__init__.py	2008-10-09 11:38:20 +0000
@@ -31,7 +31,7 @@
 
 """
 import bzrlib
-from bzrlib import bzrdir, log, repository
+from bzrlib import api, bzrdir, log, repository
 from bzrlib.bzrdir import BzrDirFormat
 from bzrlib.errors import BzrError
 from bzrlib.commands import Command, register_command, display_command
@@ -54,28 +54,8 @@
     version_string = '%d.%d.%d%s%d' % version_info
 __version__ = version_string
 
-COMPATIBLE_BZR_VERSIONS = [(1, 6), (1, 7)]
-
-def check_bzrlib_version(desired):
-    """Check that bzrlib is compatible.
-
-    If version is < all compatible version, assume incompatible.
-    If version is compatible version + 1, assume compatible, with deprecations
-    Otherwise, assume incompatible.
-    """
-    bzrlib_version = bzrlib.version_info[:2]
-    if (bzrlib_version in desired or 
-        ((bzrlib_version[0], bzrlib_version[1]-1) in desired and 
-         bzrlib.version_info[3] in ('dev', 'exp'))):
-        return
-    if bzrlib_version < desired[0]:
-        raise BzrError('Installed bzr version %s is too old to be used with bzr-svn, at least %s.%s required' % (bzrlib.__version__, desired[0][0], desired[0][1]))
-    else:
-        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 not (bzrlib_version[0], bzrlib_version[1]-1) in desired:
-            raise BzrError('Version mismatch')
+COMPATIBLE_BZR_VERSIONS = [(1, 9, 0)]
+
 
 def check_subversion_version(subvertpy):
     """Check that Subversion is compatible.
@@ -145,7 +125,8 @@
     if _versions_checked:
         return
     _versions_checked = True
-    check_bzrlib_version(COMPATIBLE_BZR_VERSIONS)
+    api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
+
 
 _optimizers_registered = False
 def lazy_register_optimizers():

=== modified file 'errors.py'
--- a/errors.py	2008-10-02 21:18:28 +0000
+++ b/errors.py	2008-10-09 11:38:20 +0000
@@ -63,14 +63,6 @@
         self.existing_path = existing_path
 
 
-class RaRequestFailed(BzrError):
-    _fmt = """A Subversion remote access command failed: %(message)"""
-
-    def __init__(self, message):
-        BzrError.__init__(self)
-        self.mesage = message
-
-
 class RevpropChangeFailed(BzrError):
     _fmt = """Unable to set revision property %(name)s."""
 
@@ -80,7 +72,7 @@
 
 
 class DavRequestFailed(BzrError):
-    _fmt = """%(msg)s"""
+    _fmt = """A Subversion remote access command failed: %(msg)s"""
 
     def __init__(self, msg):
         BzrError.__init__(self)
@@ -107,8 +99,6 @@
         return TransportError("Malformed data", msg)
     elif num == subvertpy.ERR_RA_NOT_IMPLEMENTED:
         return NotImplementedError("Function not implemented in remote server")
-    elif num == subvertpy.ERR_RA_DAV_REQUEST_FAILED:
-        return RaRequestFailed(msg)
     elif num == subvertpy.ERR_UNKNOWN_HOSTNAME:
         return ConnectionError(msg=msg)
     elif num == subvertpy.ERR_RA_DAV_REQUEST_FAILED:

=== modified file 'subvertpy/setup.py'
--- a/subvertpy/setup.py	2008-10-02 20:58:16 +0000
+++ b/subvertpy/setup.py	2008-10-09 11:38:20 +0000
@@ -112,7 +112,7 @@
     """
     abd = apr_build_data()
     sbd = svn_build_data()
-    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-lsvn_subr-1', '-x', 'c', '-']
+    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-lsvn_subr-1', '-o', '.keychain_check', '-x', 'c', '-']
     (gcc_in, gcc_out, gcc_err) = os.popen3(gcc_command_args)
     gcc_in.write("""
 #include <svn_auth.h>
@@ -122,6 +122,8 @@
 """)
     gcc_in.close()
     gcc_out.read()
+    if os.path.exists('.keychain_check'):
+        os.remove('.keychain_check')
     return (gcc_out.close() is None)
 
 class VersionQuery(object):

=== modified file 'tests/test_errors.py'
--- a/tests/test_errors.py	2008-10-02 21:18:28 +0000
+++ b/tests/test_errors.py	2008-10-09 11:38:20 +0000
@@ -41,8 +41,8 @@
         self.assertIsInstance(convert_error(SubversionException("foo", -4)),
                 SubversionException)
 
-    def test_convert_ra_request_failed(self):
-        self.assertIsInstance(convert_error(SubversionException("foo", ERR_RA_DAV_REQUEST_FAILED)), RaRequestFailed)
+    def test_convert_dav_request_failed(self):
+        self.assertIsInstance(convert_error(SubversionException("foo", ERR_RA_DAV_REQUEST_FAILED)), DavRequestFailed)
 
     def test_convert_malformed(self):
         self.assertIsInstance(convert_error(SubversionException("foo", ERR_RA_SVN_MALFORMED_DATA)), TransportError)




More information about the bazaar-commits mailing list