Rev 1319: Fix conversion of revprops. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Mon Jun 23 16:11:34 BST 2008


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

------------------------------------------------------------
revno: 1319
revision-id: jelmer at samba.org-20080623151133-rqg81i98d76x1m5p
parent: jelmer at samba.org-20080623144846-0t01vdjrsdw66erx
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-06-23 17:11:33 +0200
message:
  Fix conversion of revprops.
modified:
  logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
  util.c                         util.c-20080531154025-s8ef6ej9tytsnkkw-1
=== modified file 'logwalker.py'
--- a/logwalker.py	2008-06-23 13:59:19 +0000
+++ b/logwalker.py	2008-06-23 15:11:33 +0000
@@ -313,7 +313,7 @@
 
         try:
             try:
-                self.actual._transport.get_log(rcvr, None, self.saved_revnum, to_revnum, 0, True, True, False, [])
+                self.actual._transport.get_log(rcvr, None, self.saved_revnum, to_revnum, 0, True, True, False, todo_revprops)
             except SubversionException, (_, num):
                 if num == ERR_FS_NO_SUCH_REVISION:
                     raise NoSuchRevision(branch=self, 

=== modified file 'util.c'
--- a/util.c	2008-06-22 22:08:50 +0000
+++ b/util.c	2008-06-23 15:11:33 +0000
@@ -174,23 +174,14 @@
 svn_error_t *py_svn_log_entry_receiver(void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)
 {
 	PyObject *revprops, *py_changed_paths, *ret;
-    apr_hash_index_t *idx;
-    const char *key;
-    apr_ssize_t klen;
-	char *val;
 
 	py_changed_paths = pyify_changed_paths(log_entry->changed_paths, pool);
 	if (py_changed_paths == NULL)
 		return py_svn_error();
 
-	revprops = PyDict_New();
-	if (log_entry->revprops != NULL) {
-		 for (idx = apr_hash_first(pool, log_entry->revprops); idx != NULL;
-             idx = apr_hash_next(idx)) {
-            apr_hash_this(idx, (const void **)&key, &klen, (void **)&val);
-			PyDict_SetItemString(revprops, key, PyString_FromString(val));
-		}
-	}
+	revprops = prop_hash_to_dict(log_entry->revprops);
+	if (revprops == NULL)
+		return py_svn_error();
 
     ret = PyObject_CallFunction((PyObject *)baton, "OlOb", py_changed_paths, 
 								 log_entry->revision, revprops, log_entry->has_children);




More information about the bazaar-commits mailing list