Rev 1085: Removing remaining imports of old svn bindings. in file:///data/jelmer/bzr-svn/cext/

Jelmer Vernooij jelmer at samba.org
Thu Jun 5 18:05:57 BST 2008


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

------------------------------------------------------------
revno: 1085
revision-id: jelmer at samba.org-20080605170557-o621fr0vw6rvjhzb
parent: jelmer at samba.org-20080605164900-ft3mf232ug3xx22w
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Thu 2008-06-05 19:05:57 +0200
message:
  Removing remaining imports of old svn bindings.
modified:
  .bzrignore                     bzrignore-20060516185138-862ea098064007af
  auth.py                        auth.py-20071209174622-w8d42k6nm5yhxvi8-1
  branchprops.py                 branchprops.py-20061223204623-80lvm7pjrpsgk0dd-1
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  config.py                      config.py-20070624185721-0j8f1ly75uo4s1lk-1
  logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
  revids.py                      revids.py-20070416220458-36vfa0730cchevp1-1
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
  tests/test_repository.py       test_repos.py-20060508151940-ddc49a59257ca712
=== modified file '.bzrignore'
--- a/.bzrignore	2008-03-29 14:16:02 +0000
+++ b/.bzrignore	2008-06-05 17:05:57 +0000
@@ -4,13 +4,6 @@
 tags
 apidocs
 .plugins
-ra.c
-wc.c
-core.c
-ra.h
-core.h
-client.c
-repos.c
 FAQ.html
 README.html
 AUTHORS.html

=== modified file 'auth.py'
--- a/auth.py	2008-05-31 02:14:56 +0000
+++ b/auth.py	2008-06-05 17:05:57 +0000
@@ -17,7 +17,7 @@
 
 from bzrlib.config import AuthenticationConfig
 from bzrlib.ui import ui_factory
-from ra import (get_username_prompt_provider,
+from bzrlib.plugins.svn.ra import (get_username_prompt_provider,
                 get_simple_prompt_provider,
                 get_ssl_server_trust_prompt_provider,
                 get_ssl_client_cert_pw_prompt_provider,
@@ -27,8 +27,7 @@
                 get_ssl_server_trust_file_provider,
                 Auth
                 )
-import ra
-import constants
+from bzrlib.plugins.svn import constants, ra
 import urlparse
 import urllib
 
@@ -178,7 +177,7 @@
     if creds is not None:
         (user, password) = urllib.splitpasswd(creds)
         if user is not None:
-            auth_baton.set_parameter(svn.core.SVN_AUTH_PARAM_DEFAULT_USERNAME, user)
+            auth_baton.set_parameter(constants.AUTH_PARAM_DEFAULT_USERNAME, user)
         if password is not None:
-            auth_baton.set_parameter(svn.core.SVN_AUTH_PARAM_DEFAULT_PASSWORD, password)
+            auth_baton.set_parameter(constants.AUTH_PARAM_DEFAULT_PASSWORD, password)
     return auth_baton

=== modified file 'branchprops.py'
--- a/branchprops.py	2008-05-30 02:30:03 +0000
+++ b/branchprops.py	2008-06-05 17:05:57 +0000
@@ -19,8 +19,8 @@
 from bzrlib.errors import NoSuchRevision
 from bzrlib.trace import mutter
 
-import constants
-from core import SubversionException
+from bzrlib.plugins.svn import constants
+from bzrlib.plugins.svn.core import SubversionException
 
 
 class PathPropertyProvider(object):

=== modified file 'commit.py'
--- a/commit.py	2008-06-05 14:48:23 +0000
+++ b/commit.py	2008-06-05 17:05:57 +0000
@@ -280,18 +280,18 @@
             if child_editor is not None:
                 if old_executable != child_ie.executable:
                     if child_ie.executable:
-                        value = core.SVN_PROP_EXECUTABLE_VALUE
+                        value = constants.PROP_EXECUTABLE_VALUE
                     else:
                         value = None
-                    child_editor.change_prop(core.SVN_PROP_EXECUTABLE, value)
+                    child_editor.change_prop(constants.PROP_EXECUTABLE, value)
 
                 if old_special != (child_ie.kind == 'symlink'):
                     if child_ie.kind == 'symlink':
-                        value = core.SVN_PROP_SPECIAL_VALUE
+                        value = constants.PROP_SPECIAL_VALUE
                     else:
                         value = None
 
-                    child_editor.change_prop(core.SVN_PROP_SPECIAL, value)
+                    child_editor.change_prop(constants.PROP_SPECIAL, value)
 
             # handle the file
             if child_ie.file_id in self.modified_files:
@@ -691,7 +691,7 @@
     try:
         builder.commit(rev.message)
     except SubversionException, (_, num):
-        if num == svn.core.SVN_ERR_FS_TXN_OUT_OF_DATE:
+        if num == constants.ERR_FS_TXN_OUT_OF_DATE:
             raise DivergedBranches(source, target)
         raise
     except ChangesRootLHSHistory:

=== modified file 'config.py'
--- a/config.py	2008-05-11 20:03:21 +0000
+++ b/config.py	2008-06-05 17:05:57 +0000
@@ -18,10 +18,10 @@
 from bzrlib import osutils, urlutils, trace
 from bzrlib.config import IniBasedConfig, config_dir, ensure_config_dir_exists, GlobalConfig, LocationConfig, Config, STORE_BRANCH, STORE_GLOBAL, STORE_LOCATION
 
+from bzrlib.plugins.svn.core import SubversionException
+
 import os
 
-import svn.core
-
 # Settings are stored by UUID. 
 # Data stored includes default branching scheme and locations the repository 
 # was seen at.
@@ -120,7 +120,7 @@
         def get_list(parser, section):
             try:
                 if parser.get_bool(section, "override-svn-revprops"):
-                    return [svn.core.SVN_PROP_REVISION_DATE, svn.core.SVN_PROP_REVISION_AUTHOR]
+                    return [constants.PROP_REVISION_DATE, constants.PROP_REVISION_AUTHOR]
                 return []
             except ValueError:
                 val = parser.get_value(section, "override-svn-revprops")
@@ -228,7 +228,7 @@
                     return "True"
                 else:
                     return "False"
-            except svn.core.SubversionException:
+            except SubversionException:
                 return None
         return None
 

=== modified file 'logwalker.py'
--- a/logwalker.py	2008-06-05 15:24:31 +0000
+++ b/logwalker.py	2008-06-05 17:05:57 +0000
@@ -425,7 +425,7 @@
         try:
             paths = struct_revpaths_to_tuples(self._transport.iter_log([path], revnum, revnum, 1, True, False, []).next()[0])
         except SubversionException, (_, num):
-            if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
+            if num == constants.ERR_FS_NO_SUCH_REVISION:
                 raise NoSuchRevision(branch=self, 
                     revision="Revision number %d" % revnum)
             raise

=== modified file 'revids.py'
--- a/revids.py	2008-06-04 15:20:12 +0000
+++ b/revids.py	2008-06-05 17:05:57 +0000
@@ -20,8 +20,7 @@
 from bzrlib.errors import (InvalidRevisionId, NoSuchRevision)
 from bzrlib.trace import mutter
 
-import svn.core
-
+from bzrlib.plugins.svn import core
 from bzrlib.plugins.svn.cache import CacheTable
 from bzrlib.plugins.svn.errors import InvalidPropertyValue
 from bzrlib.plugins.svn.mapping import (parse_revision_id, BzrSvnMapping, 
@@ -37,8 +36,8 @@
         # See if there is a bzr:revision-id revprop set
         try:
             (bzr_revno, revid) = mapping.get_revision_id(path, revprops, fileprops)
-        except svn.core.SubversionException, (_, num):
-            if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
+        except SubversionException, (_, num):
+            if num == constants.ERR_FS_NO_SUCH_REVISION:
                 raise NoSuchRevision(path, revnum)
             raise
 
@@ -85,7 +84,7 @@
                             revids.add((parse_revid_property(line), scheme))
                         except InvalidPropertyValue, ie:
                             mutter(str(ie))
-            except svn.core.SubversionException, (_, svn.core.SVN_ERR_FS_NOT_DIRECTORY):
+            except SubversionException, (_, constants.ERR_FS_NOT_DIRECTORY):
                     continue
 
             # If there are any new entries that are not yet in the cache, 

=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-06-05 14:48:23 +0000
+++ b/tests/__init__.py	2008-06-05 17:05:57 +0000
@@ -224,9 +224,7 @@
 
         :return: FS.
         """
-        repos = svn.repos.open(relpath)
-
-        return svn.repos.fs(repos)
+        return repos.Repository(relpath).fs()
 
     def commit_editor(self, url, message="Test commit"):
         ra = RemoteAccess(url.encode('utf8'))

=== modified file 'tests/test_repository.py'
--- a/tests/test_repository.py	2008-06-05 10:23:08 +0000
+++ b/tests/test_repository.py	2008-06-05 17:05:57 +0000
@@ -498,7 +498,7 @@
         self.assertTrue(isinstance(bzrdir, BzrDir))
         repository = bzrdir._find_repository()
         fs = self.open_fs('c')
-        self.assertEqual(fs.get_uuid(fs), repository.uuid)
+        self.assertEqual(fs.get_uuid(), repository.uuid)
 
     def test_get_inventory_weave(self):
         bzrdir = self.make_client_and_bzrdir('d', 'dc')




More information about the bazaar-commits mailing list