Rev 1430: Fix reporter calls. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Fri Jul 4 05:47:05 BST 2008


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

------------------------------------------------------------
revno: 1430
revision-id: jelmer at samba.org-20080704044658-w0dd76qrifdji1kf
parent: jelmer at samba.org-20080704042618-6udmjhkb9n0yyueg
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Fri 2008-07-04 06:46:58 +0200
message:
  Fix reporter calls.
modified:
  TODO                           todo-20060729211917-2kpobww0zyvvo0j2-1
  util.c                         util.c-20080531154025-s8ef6ej9tytsnkkw-1
  wc.c                           wc.pyx-20080313142018-10l8l23vha2j9e6b-1
=== modified file 'TODO'
--- a/TODO	2007-12-21 20:19:24 +0000
+++ b/TODO	2008-07-04 04:46:58 +0000
@@ -1,7 +1,6 @@
 todo:
 - generate deltas rather than fulltexts when creating file id maps
 - BzrDir.create_branch() should set the revision id to NULL_REVISION
-- avoid extra connect in logwalker?
 - tests for setting svk:merge from .bzr checkout
 - tests for http-specific SvnRaTransport._request_path() code
 - tests for auth.py
@@ -9,7 +8,6 @@
  - svn-import without scheme specified should guess
  - bzr missing
 - transform file ids in workingtree in svn-upgrade
-- support tags (#81102)
 - more efficient implementation of get_revision_delta() to speed up bzr log -v
 - nestedtree support
 - lookup_revision_id()'s result depends on the current branching scheme, 

=== modified file 'util.c'
--- a/util.c	2008-07-03 16:38:27 +0000
+++ b/util.c	2008-07-04 04:46:58 +0000
@@ -290,7 +290,7 @@
 static svn_error_t *py_stream_close(void *baton)
 {
 	PyObject *self = (PyObject *)baton, *ret;
-	ret = PyObject_CallMethod(self, "close", NULL);
+	ret = PyObject_CallMethod(self, "close", "");
 	Py_DECREF(self);
 	if (ret == NULL)
 		return py_svn_error();
@@ -313,7 +313,7 @@
 {
 	PyObject *py_fn = (PyObject *)cancel_baton;
 	if (py_fn != Py_None) {
-		PyObject *ret = PyObject_CallFunction(py_fn, NULL);
+		PyObject *ret = PyObject_CallFunction(py_fn, "");
 		if (PyBool_Check(ret) && ret == Py_True) {
 			Py_DECREF(ret);
 			return svn_error_create(SVN_ERR_CANCELLED, NULL, NULL);

=== modified file 'wc.c'
--- a/wc.c	2008-07-03 16:38:27 +0000
+++ b/wc.c	2008-07-04 04:46:58 +0000
@@ -38,7 +38,7 @@
 	} else {
 		py_lock_token = PyString_FromString(lock_token);
 	}
-	ret = PyObject_CallFunction(self, "set_path", "slbO", path, revision, start_empty, py_lock_token);
+	ret = PyObject_CallMethod(self, "set_path", "slbO", path, revision, start_empty, py_lock_token);
 	if (ret == NULL)
 		return py_svn_error();
 	return NULL;
@@ -47,7 +47,7 @@
 static svn_error_t *py_ra_report_delete_path(void *baton, const char *path, apr_pool_t *pool)
 {
 	PyObject *self = (PyObject *)baton, *ret;
-	ret = PyObject_CallFunction(self, "delete_path", "s", path);
+	ret = PyObject_CallMethod(self, "delete_path", "s", path);
 	if (ret == NULL)
 		return py_svn_error();
 	return NULL;
@@ -61,7 +61,7 @@
 	} else { 
 		py_lock_token = PyString_FromString(lock_token);
 	}
-	ret = PyObject_CallFunction(self, "link_path", "sslbO", path, url, revision, start_empty, py_lock_token);
+	ret = PyObject_CallMethod(self, "link_path", "sslbO", path, url, revision, start_empty, py_lock_token);
 	if (ret == NULL)
 		return py_svn_error();
 	return NULL;
@@ -70,7 +70,7 @@
 static svn_error_t *py_ra_report_finish(void *baton, apr_pool_t *pool)
 {
 	PyObject *self = (PyObject *)baton, *ret;
-	ret = PyObject_CallFunction(self, "finish", NULL);
+	ret = PyObject_CallMethod(self, "finish", "");
 	if (ret == NULL)
 		return py_svn_error();
 	return NULL;
@@ -79,7 +79,7 @@
 static svn_error_t *py_ra_report_abort(void *baton, apr_pool_t *pool)
 {
 	PyObject *self = (PyObject *)baton, *ret;
-	ret = PyObject_CallFunction(self, "abort", NULL);
+	ret = PyObject_CallMethod(self, "abort", "");
 	if (ret == NULL)
 		return py_svn_error();
 	return NULL;
@@ -122,12 +122,13 @@
 
 void py_wc_notify_func(void *baton, const svn_wc_notify_t *notify, apr_pool_t *pool)
 {
-	PyObject *func = baton;
+	PyObject *func = baton, *ret;
 	if (func == Py_None)
 		return;
 
 	if (notify->err != NULL) {
-		PyObject_CallFunction(func, "O", PyErr_NewSubversionException(notify->err));
+		ret = PyObject_CallFunction(func, "O", PyErr_NewSubversionException(notify->err));
+		Py_XDECREF(ret);
 		/* FIXME: Use return value */
 	}
 }




More information about the bazaar-commits mailing list