You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/12/02 19:56:33 UTC

svn commit: r1209637 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: hwright
Date: Fri Dec  2 18:56:32 2011
New Revision: 1209637

URL: http://svn.apache.org/viewvc?rev=1209637&view=rev
Log:
Ev2 shims: when driving an editor tree, set the properties on a node directly,
rather than as a child in the recursive call.

This may seem a bit trivial, but the impact is that the root of the edit wasn't
getting properties set (since it didn't have a parent to do so).

Current number of test failures: 1006 (down from 1200)

* subversion/libsvn_delta/compat.c
  (change_props): Const-ify a param.
  (drive_tree): Move the call to change_props() out of the loop.  While we're
    here, destroy and iterpool.

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

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1209637&r1=1209636&r2=1209637&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Fri Dec  2 18:56:32 2011
@@ -1223,7 +1223,7 @@ move_cb(void *baton,
 static svn_error_t *
 change_props(const svn_delta_editor_t *editor,
              void *baton,
-             struct operation *child,
+             const struct operation *child,
              apr_pool_t *scratch_pool)
 {
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -1365,10 +1365,20 @@ drive_tree(const struct operation *opera
                     || child->operation == OP_ADD))
         {
           SVN_ERR(drive_tree(child, editor, make_abs_paths, iterpool));
-          SVN_ERR(change_props(editor, child->baton, child, iterpool));
           SVN_ERR(editor->close_directory(child->baton, iterpool));
         }
     }
+  svn_pool_destroy(iterpool);
+
+  /* Finally, for this node, if it's a directory, change any props before
+     returning (our caller will close the directory. */
+  if (operation->kind == svn_kind_dir
+                   && (operation->operation == OP_OPEN
+                    || operation->operation == OP_PROPSET
+                    || operation->operation == OP_ADD))
+    {
+      SVN_ERR(change_props(editor, operation->baton, operation, scratch_pool));
+    }
 
   return SVN_NO_ERROR;
 }