You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/05/04 21:52:47 UTC

svn commit: r1334141 - /subversion/trunk/subversion/libsvn_delta/editor.c

Author: gstein
Date: Fri May  4 19:52:47 2012
New Revision: 1334141

URL: http://svn.apache.org/viewvc?rev=1334141&view=rev
Log:
Use the more correct STATE_POOL name for the long-lived state's pool.

Note: this pool is only available/used when SVN_DEBUG.

* subversion/libsvn_delta/editor.c:
  (struct svn_editor_t): s/RESULT_POOL/STATE_POOL/
  (MARK_RELPATH): track rename
  (mark_parent_stable): switch to MARK_RELPATH and automagically track
    the rename.
  (svn_editor_create, svn_editor_add_directory): track rename

Modified:
    subversion/trunk/subversion/libsvn_delta/editor.c

Modified: subversion/trunk/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/editor.c?rev=1334141&r1=1334140&r2=1334141&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/editor.c (original)
+++ subversion/trunk/subversion/libsvn_delta/editor.c Fri May  4 19:52:47 2012
@@ -61,7 +61,7 @@ struct svn_editor_t
   apr_hash_t *completed_nodes;
   svn_boolean_t finished;
 
-  apr_pool_t *result_pool;
+  apr_pool_t *state_pool;
 #endif
 };
 
@@ -105,7 +105,7 @@ static const int marker_added_dir;
 
 #define MARK_RELPATH(editor, relpath, value) \
   apr_hash_set((editor)->completed_nodes, \
-               apr_pstrdup((editor)->result_pool, relpath), \
+               apr_pstrdup((editor)->state_pool, relpath), \
                APR_HASH_KEY_STRING, value)
 
 #define MARK_COMPLETED(editor, relpath) \
@@ -217,9 +217,7 @@ mark_parent_stable(const svn_editor_t *e
   SVN_ERR_ASSERT_NO_RETURN(marker != MARKER_ALLOW_ADD);
 
   /* MARKER is NULL. Upgrade it to MARKER_ALLOW_ALTER.  */
-  apr_hash_set(editor->completed_nodes,
-               apr_pstrdup(editor->result_pool, parent), APR_HASH_KEY_STRING,
-               MARKER_ALLOW_ALTER);
+  MARK_RELPATH(editor, parent, MARKER_ALLOW_ALTER);
 }
 
 #else
@@ -274,7 +272,7 @@ svn_editor_create(svn_editor_t **editor,
   (*editor)->pending_incomplete_children = apr_hash_make(result_pool);
   (*editor)->completed_nodes = apr_hash_make(result_pool);
   (*editor)->finished = FALSE;
-  (*editor)->result_pool = result_pool;
+  (*editor)->state_pool = result_pool;
 #endif
 
   return SVN_NO_ERROR;
@@ -501,7 +499,7 @@ svn_editor_add_directory(svn_editor_t *e
       {
         const char *child_basename = APR_ARRAY_IDX(children, i, const char *);
         const char *child = svn_relpath_join(relpath, child_basename,
-                                             editor->result_pool);
+                                             editor->state_pool);
 
         apr_hash_set(editor->pending_incomplete_children, child,
                      APR_HASH_KEY_STRING, "");