Index: subversion/libsvn_repos/log.c =================================================================== --- subversion/libsvn_repos/log.c (revision 5943) +++ subversion/libsvn_repos/log.c (working copy) @@ -35,29 +35,32 @@ * properties of the node were changed, or that the node was added or * deleted. * - * The key is allocated in POOL; the value is (void *) 'U', 'A', 'D', - * or 'R', for modified, added, deleted, or replaced, respectively. + * The CHANGED hash set and the key are allocated in POOL; + * the value is (void *) 'U', 'A', 'D', or 'R', for modified, added, + * deleted, or replaced, respectively. * */ static svn_error_t * -detect_changed (apr_hash_t *changed, +detect_changed (apr_hash_t **changed, svn_fs_root_t *root, apr_pool_t *pool) { apr_hash_t *changes; apr_hash_index_t *hi; - svn_log_changed_path_t *item; apr_pool_t *subpool = svn_pool_create (pool); - SVN_ERR (svn_fs_paths_changed (&changes, root, subpool)); - for (hi = apr_hash_first (subpool, changes); hi; hi = apr_hash_next (hi)) + *changed = apr_hash_make (pool); + SVN_ERR (svn_fs_paths_changed (&changes, root, pool)); + for (hi = apr_hash_first (pool, changes); hi; hi = apr_hash_next (hi)) { const void *key; void *val; svn_fs_path_change_t *change; const char *path; char action; + svn_log_changed_path_t *item; + svn_pool_clear (subpool); /* KEY will be the path, VAL the change. */ apr_hash_this (hi, &key, NULL, &val); path = (const char *) key; @@ -102,7 +105,7 @@ item->copyfrom_rev = copyfrom_rev; } } - apr_hash_set (changed, apr_pstrdup (pool, path), + apr_hash_set (*changed, apr_pstrdup (pool, path), APR_HASH_KEY_STRING, item); } @@ -203,9 +206,8 @@ if ((this_rev > 0) && discover_changed_paths) { svn_fs_root_t *newroot; - changed_paths = apr_hash_make (subpool); SVN_ERR (svn_fs_revision_root (&newroot, fs, this_rev, subpool)); - SVN_ERR (detect_changed (changed_paths, newroot, subpool)); + SVN_ERR (detect_changed (&changed_paths, newroot, subpool)); } else changed_paths = NULL;