Rev 1268: Remove second definition of get_config. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Sun Jun 22 14:35:19 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.4

------------------------------------------------------------
revno: 1268
revision-id: jelmer at samba.org-20080622133517-ant471fwmcdxgue2
parent: jelmer at samba.org-20080622085156-0i0l7dprgs9flztq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 15:35:17 +0200
message:
  Remove second definition of get_config.
modified:
  core.c                         core.pyx-20080313210413-17k59slolpfe5kdq-1
  tests/test_client.py           test_client.py-20080603021344-lmgexez0yoyp9b1s-1
  tests/test_core.py             test_core.py-20080603032119-q91zmret1lv84ay9-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
=== modified file 'core.c'
--- a/core.c	2008-06-22 08:08:39 +0000
+++ b/core.c	2008-06-22 13:35:17 +0000
@@ -73,42 +73,7 @@
 	.tp_dealloc = (destructor)PyObject_Del,
 };
 
-static PyObject *get_config(PyObject *self, PyObject *args)
-{
-    apr_pool_t *pool;
-    apr_hash_t *cfg_hash = NULL;
-    apr_hash_index_t *idx;
-    const char *key;
-    svn_config_t *val;
-    apr_ssize_t klen;
-	char *config_dir = NULL;
-	PyObject *ret;
-
-	if (!PyArg_ParseTuple(args, "|z", &config_dir))
-		return NULL;
-
-    pool = Pool(NULL);
-	if (pool == NULL)
-		return NULL;
-
-    RUN_SVN_WITH_POOL(pool, 
-					  svn_config_get_config(&cfg_hash, config_dir, pool));
-    ret = PyDict_New();
-    for (idx = apr_hash_first(pool, cfg_hash); idx != NULL; 
-		 idx = apr_hash_next(idx)) {
-		ConfigObject *data;
-        apr_hash_this(idx, (const void **)&key, &klen, (void **)&val);
-		data = PyObject_New(ConfigObject, &Config_Type);
-		data->item = val;
-        PyDict_SetItemString(ret, key, (PyObject *)data);
-	}
-    apr_pool_destroy(pool);
-    return ret;
-}
-
-
 static PyMethodDef core_methods[] = {
-	{ "get_config", get_config, METH_VARARGS, NULL },
 	{ "time_from_cstring", time_from_cstring, METH_VARARGS, NULL },
 	{ "time_to_cstring", time_to_cstring, METH_VARARGS, NULL },
 	{ NULL, }

=== modified file 'tests/test_client.py'
--- a/tests/test_client.py	2008-06-22 08:51:56 +0000
+++ b/tests/test_client.py	2008-06-22 13:35:17 +0000
@@ -28,3 +28,7 @@
     def test_add(self):
         self.build_tree({"dc/foo": None})
         self.client.add("dc/foo")
+
+    def test_get_config(self):
+        self.assertIsInstance(client.get_config().__dict__, dict)
+

=== modified file 'tests/test_core.py'
--- a/tests/test_core.py	2008-06-22 08:14:55 +0000
+++ b/tests/test_core.py	2008-06-22 13:35:17 +0000
@@ -25,9 +25,6 @@
     def test_exc(self):
         self.assertIsInstance(core.SubversionException("foo", 1), Exception)
 
-    def test_get_config(self):
-        self.assertIsInstance(core.get_config(), dict)
-
     def test_time_from_cstring(self):
         self.assertEquals(1225704780716938L, core.time_from_cstring("2008-11-03T09:33:00.716938Z"))
 

=== modified file 'transport.py'
--- a/transport.py	2008-06-22 06:14:38 +0000
+++ b/transport.py	2008-06-22 13:35:17 +0000
@@ -15,16 +15,19 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 """Simple transport for accessing Subversion smart servers."""
 
+import bzrlib
 from bzrlib import debug, urlutils
 from bzrlib.errors import (NoSuchFile, NotBranchError, TransportNotPossible, 
                            FileExists, NotLocalUrl, InvalidURL)
 from bzrlib.trace import mutter
 from bzrlib.transport import Transport
 
+import bzrlib.plugins.svn
 from bzrlib.plugins.svn import core, properties, ra
 from bzrlib.plugins.svn import properties
 from bzrlib.plugins.svn.auth import create_auth_baton
-from bzrlib.plugins.svn.core import SubversionException, get_config
+from bzrlib.plugins.svn.client import get_config
+from bzrlib.plugins.svn.core import SubversionException
 from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_FOUND, ERR_FS_NOT_DIRECTORY
 from bzrlib.plugins.svn.ra import DIRENT_KIND, RemoteAccess
 import urlparse




More information about the bazaar-commits mailing list