You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2010/08/07 19:38:02 UTC
svn commit: r983266 - /subversion/trunk/subversion/svnrdump/load_editor.c
Author: artagnon
Date: Sat Aug 7 17:38:01 2010
New Revision: 983266
URL: http://svn.apache.org/viewvc?rev=983266&view=rev
Log:
* subversion/svnrdump/load_editor.c
(new_node_record): For closing directories, use the lighter
svn_path_component_count instead of svn_path_decompose, since we
don't need the individual components to close directories. Also,
don't tax the rb->pool unnecessarily- use the scratch pool for the
local variables.
Modified:
subversion/trunk/subversion/svnrdump/load_editor.c
Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=983266&r1=983265&r2=983266&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Sat Aug 7 17:38:01 2010
@@ -115,8 +115,8 @@ new_node_record(void **node_baton,
void *commit_edit_baton;
char *ancestor_path;
apr_array_header_t *residual_open_path;
- apr_array_header_t *residual_close_path;
const char *nb_dirname;
+ apr_size_t residual_close_count;
int i;
rb = revision_baton;
@@ -212,18 +212,16 @@ new_node_record(void **node_baton,
ancestor_path =
svn_relpath_get_longest_ancestor(nb_dirname,
rb->db->relpath, pool);
- residual_close_path =
- svn_path_decompose(svn_relpath_skip_ancestor(ancestor_path,
- rb->db->relpath),
- rb->pool);
+ residual_close_count =
+ svn_path_component_count(svn_relpath_skip_ancestor(ancestor_path,
+ rb->db->relpath));
residual_open_path =
svn_path_decompose(svn_relpath_skip_ancestor(ancestor_path,
- nb_dirname),
- rb->pool);
+ nb_dirname), pool);
/* First close all as many directories as there are after
skip_ancestor, and then open fresh directories */
- for (i = 0; i < residual_close_path->nelts; i ++)
+ for (i = 0; i < residual_close_count; i ++)
{
/* Don't worry about destroying the actual rb->db object,
since the pool we're using has the lifetime of one