summaryrefslogtreecommitdiff
path: root/subversion/libsvn_repos/reporter.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2014-02-20 19:26:10 +0000
committerPeter Wemm <peter@FreeBSD.org>2014-02-20 19:26:10 +0000
commit219f5ebf8fca3572d8d4265d78d0e4670ca35a27 (patch)
treee6232088e2faabbf0f1a6e568df3285323f27c5c /subversion/libsvn_repos/reporter.c
parenteeb88685bfa4ef1c0639f1136d83ff19de1b4595 (diff)
Notes
Diffstat (limited to 'subversion/libsvn_repos/reporter.c')
-rw-r--r--subversion/libsvn_repos/reporter.c55
1 files changed, 31 insertions, 24 deletions
diff --git a/subversion/libsvn_repos/reporter.c b/subversion/libsvn_repos/reporter.c
index a9d1eff5fa389..de46858790fef 100644
--- a/subversion/libsvn_repos/reporter.c
+++ b/subversion/libsvn_repos/reporter.c
@@ -1143,7 +1143,8 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
svn_fs_root_t *s_root;
apr_hash_t *s_entries = NULL, *t_entries;
apr_hash_index_t *hi;
- apr_pool_t *subpool;
+ apr_pool_t *subpool = svn_pool_create(pool);
+ apr_pool_t *iterpool;
const char *name, *s_fullpath, *t_fullpath, *e_fullpath;
path_info_t *info;
@@ -1152,7 +1153,8 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
When we support directory locks, we must pass the lock token here. */
SVN_ERR(delta_proplists(b, s_rev, start_empty ? NULL : s_path, t_path,
- NULL, change_dir_prop, dir_baton, pool));
+ NULL, change_dir_prop, dir_baton, subpool));
+ svn_pool_clear(subpool);
if (requested_depth > svn_depth_empty
|| requested_depth == svn_depth_unknown)
@@ -1161,19 +1163,19 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
if (s_path && !start_empty)
{
SVN_ERR(get_source_root(b, &s_root, s_rev));
- SVN_ERR(svn_fs_dir_entries(&s_entries, s_root, s_path, pool));
+ SVN_ERR(svn_fs_dir_entries(&s_entries, s_root, s_path, subpool));
}
- SVN_ERR(svn_fs_dir_entries(&t_entries, b->t_root, t_path, pool));
+ SVN_ERR(svn_fs_dir_entries(&t_entries, b->t_root, t_path, subpool));
/* Iterate over the report information for this directory. */
- subpool = svn_pool_create(pool);
+ iterpool = svn_pool_create(pool);
while (1)
{
const svn_fs_dirent_t *s_entry, *t_entry;
- svn_pool_clear(subpool);
- SVN_ERR(fetch_path_info(b, &name, &info, e_path, subpool));
+ svn_pool_clear(iterpool);
+ SVN_ERR(fetch_path_info(b, &name, &info, e_path, iterpool));
if (!name)
break;
@@ -1193,10 +1195,10 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
continue;
}
- e_fullpath = svn_relpath_join(e_path, name, subpool);
- t_fullpath = svn_fspath__join(t_path, name, subpool);
+ e_fullpath = svn_relpath_join(e_path, name, iterpool);
+ t_fullpath = svn_fspath__join(t_path, name, iterpool);
t_entry = svn_hash_gets(t_entries, name);
- s_fullpath = s_path ? svn_fspath__join(s_path, name, subpool) : NULL;
+ s_fullpath = s_path ? svn_fspath__join(s_path, name, iterpool) : NULL;
s_entry = s_entries ?
svn_hash_gets(s_entries, name) : NULL;
@@ -1216,7 +1218,7 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
t_entry, dir_baton, e_fullpath, info,
info ? info->depth
: DEPTH_BELOW_HERE(wc_depth),
- DEPTH_BELOW_HERE(requested_depth), subpool));
+ DEPTH_BELOW_HERE(requested_depth), iterpool));
/* Don't revisit this name in the target or source entries. */
svn_hash_sets(t_entries, name, NULL);
@@ -1236,13 +1238,13 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
target, for graceful handling of case-only renames. */
if (s_entries)
{
- for (hi = apr_hash_first(pool, s_entries);
+ for (hi = apr_hash_first(subpool, s_entries);
hi;
hi = apr_hash_next(hi))
{
const svn_fs_dirent_t *s_entry;
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
s_entry = svn__apr_hash_index_val(hi);
if (svn_hash_gets(t_entries, s_entry->name) == NULL)
@@ -1259,27 +1261,29 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
continue;
/* There is no corresponding target entry, so delete. */
- e_fullpath = svn_relpath_join(e_path, s_entry->name, subpool);
+ e_fullpath = svn_relpath_join(e_path, s_entry->name, iterpool);
SVN_ERR(svn_repos_deleted_rev(svn_fs_root_fs(b->t_root),
svn_fspath__join(t_path,
s_entry->name,
- subpool),
+ iterpool),
s_rev, b->t_rev,
- &deleted_rev, subpool));
+ &deleted_rev, iterpool));
SVN_ERR(b->editor->delete_entry(e_fullpath,
deleted_rev,
- dir_baton, subpool));
+ dir_baton, iterpool));
}
}
}
/* Loop over the dirents in the target. */
- for (hi = apr_hash_first(pool, t_entries); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(subpool, t_entries);
+ hi;
+ hi = apr_hash_next(hi))
{
const svn_fs_dirent_t *s_entry, *t_entry;
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
t_entry = svn__apr_hash_index_val(hi);
if (is_depth_upgrade(wc_depth, requested_depth, t_entry->kind))
@@ -1307,24 +1311,27 @@ delta_dirs(report_baton_t *b, svn_revnum_t s_rev, const char *s_path,
svn_hash_gets(s_entries, t_entry->name)
: NULL;
s_fullpath = s_entry ?
- svn_fspath__join(s_path, t_entry->name, subpool) : NULL;
+ svn_fspath__join(s_path, t_entry->name, iterpool) : NULL;
}
/* Compose the report, editor, and target paths for this entry. */
- e_fullpath = svn_relpath_join(e_path, t_entry->name, subpool);
- t_fullpath = svn_fspath__join(t_path, t_entry->name, subpool);
+ e_fullpath = svn_relpath_join(e_path, t_entry->name, iterpool);
+ t_fullpath = svn_fspath__join(t_path, t_entry->name, iterpool);
SVN_ERR(update_entry(b, s_rev, s_fullpath, s_entry, t_fullpath,
t_entry, dir_baton, e_fullpath, NULL,
DEPTH_BELOW_HERE(wc_depth),
DEPTH_BELOW_HERE(requested_depth),
- subpool));
+ iterpool));
}
/* Destroy iteration subpool. */
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
}
+
+ svn_pool_destroy(subpool);
+
return SVN_NO_ERROR;
}