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/02/03 23:07:32 UTC

svn commit: r1240370 - in /subversion/trunk/subversion: include/svn_editor.h libsvn_delta/compat.c libsvn_delta/editor.c

Author: gstein
Date: Fri Feb  3 22:07:31 2012
New Revision: 1240370

URL: http://svn.apache.org/viewvc?rev=1240370&view=rev
Log:
Update the Ev2 API, per recent discussions. This introduces the
alter_* callbacks to atomically perform all changes to a node (rather
than the old paired-call approach).

Documentation for the changes is incomplete, for a future revision.

The compatibility shims have not been fully-updated.

* subversion/include/svn_editor.h:
  (...): note areas that need updated docco
  (svn_editor_cb_set_props_t, svn_editor_cb_set_text_t,
      svn_editor_cb_set_target_t, svn_editor_setcb_set_props,
      svn_editor_setcb_set_text, svn_editor_setcb_set_target): removed
  (svn_editor_cb_alter_directory_t, svn_editor_cb_alter_file_t,
      svn_editor_cb_alter_symlink_t): new callback typedefs
  (svn_editor_setcb_alter_directory, svn_editor_setcb_alter_file,
      svn_editor_setcb_alter_symlink): new functions to set callbacks
  (svn_editor_cb_many_t): remove old set_* callbacks. add alter_*
  (svn_editor_set_props, svn_editor_set_text, svn_editor_set_target):
    removed.
  (svn_editor_alter_directory, svn_editor_alter_file,
      svn_editor_alter_symlink): new functions to drive alter_* callbacks

* subversion/libsvn_delta/editor.c:
  (svn_editor_t): remove NEEDS_TEXT_OR_TARGET hash. no longer needed.
  (svn_editor_create): do not initialize NEEDS_TEXT_OR_TARGET member
  (svn_editor_setcb_set_props, svn_editor_setcb_set_text,
      svn_editor_setcb_set_symlink): removed
  (svn_editor_setcb_alter_directory, svn_editor_setcb_alter_file,
      svn_editor_setcb_alter_symlink): new setters
  (svn_editor_setcb_many): remove set_* copying. add alter_*
  (svn_editor_set_props): renamed to ...
  (svn_editor_alter_directory): ... this. removed COMPLETE arg. switch
    to the ALTER_DIRECTORY callback. tweak the debug ordering check.
  (svn_editor_set_text): renamed to ...
  (svn_editor_alter_file): ... this. add PROPS argument, pass to new
    ALTER_FILE callback. adjust the debug ordering checks.
  (svn_editor_set_target): renamed to ...
  (svn_editor_alter_symlink): ... this. add PROPS argument. pass to
    new ALTER_SYMLINK callback. adjust the debug ordering checks.
  (svn_editor_complete): no need to verify emptiness of NEEDS_TEXT_OR_TARGET

* subversion/libsvn_delta/compat.c:
  (process_actions): remove calls to the old set_* editor functions.
    leave a comment about possible future implementation.
  (set_props_cb): renamed to ...
  (alter_directory_cb): ... this. remove COMPLETE arg.
  (set_text_cb): renamed to ...
  (alter_file_cb): ... this. add PROPS arg and pass to build().
  (set_target_cb): renamed to ...
  (alter_target_cb): ... this. add PROPS arg. leave comments.
  (editor_from_delta): adjust the SETCB_MANY structure for the callbacks.

Modified:
    subversion/trunk/subversion/include/svn_editor.h
    subversion/trunk/subversion/libsvn_delta/compat.c
    subversion/trunk/subversion/libsvn_delta/editor.c

Modified: subversion/trunk/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_editor.h?rev=1240370&r1=1240369&r2=1240370&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_editor.h (original)
+++ subversion/trunk/subversion/include/svn_editor.h Fri Feb  3 22:07:31 2012
@@ -176,9 +176,9 @@ extern "C" {
  *      svn_editor_setcb_add_file() \n
  *      svn_editor_setcb_add_symlink() \n
  *      svn_editor_setcb_add_absent() \n
- *      svn_editor_setcb_set_props() \n
- *      svn_editor_setcb_set_text() \n
- *      svn_editor_setcb_set_target() \n
+ *      svn_editor_setcb_alter_directory() \n
+ *      svn_editor_setcb_alter_file() \n
+ *      svn_editor_setcb_alter_symlink() \n
  *      svn_editor_setcb_delete() \n
  *      svn_editor_setcb_copy() \n
  *      svn_editor_setcb_move() \n
@@ -199,9 +199,9 @@ extern "C" {
  *      svn_editor_add_file() \n
  *      svn_editor_add_symlink() \n
  *      svn_editor_add_absent() \n
- *      svn_editor_set_props() \n
- *      svn_editor_set_text() \n
- *      svn_editor_set_target() \n
+ *      svn_editor_alter_directory() \n
+ *      svn_editor_alter_file() \n
+ *      svn_editor_alter_symlink() \n
  *      svn_editor_delete() \n
  *      svn_editor_copy() \n
  *      svn_editor_move() \n
@@ -241,6 +241,7 @@ extern "C" {
  *   follow for each child mentioned in the @a children argument of any
  *   svn_editor_add_directory() call.
  *
+ * ### fix the below paragraph
  * - svn_editor_set_props()
  *   - The @a complete argument must be TRUE if no more calls will follow on
  *     the same path. @a complete must always be TRUE for directories.
@@ -250,12 +251,14 @@ extern "C" {
  *     - if @a relpath is a symlink, this must (at some point) be followed by
  *       an svn_editor_set_target() call on the same path.
  *
+ * ### fix the below paragraph
  * - svn_editor_set_text() and svn_editor_set_target() must always occur
  *   @b after an svn_editor_set_props() call on the same path, if any.
  *
  *   In other words, if there are two calls coming in on the same path, the
  *   first of them has to be svn_editor_set_props().
  *
+ * ### fix the below paragraph
  * - Other than the above two pairs of linked operations, a path should
  *   never be referenced more than once by the add_* and set_* and the
  *   delete operations (the "Once Rule"). The source path of a copy (and
@@ -293,6 +296,7 @@ extern "C" {
  *   by a delete... that is fine. It is simply that svn_editor_move()
  *   should be used to describe a semantic move.
  *
+ * ### fix the below paragraph
  * - Paths mentioned in svn_editor_rotate() may have their properties
  *   and contents edited (via set_* calls) by a previous or later call,
  *   but they may not be subject to a later move, rotate, or deletion.
@@ -309,6 +313,7 @@ extern "C" {
  * \n\n
  *
  * <h3>Receiving Restrictions</h3>
+ * ### fix the below paragraph
  * All callbacks must complete their handling of a path before they
  * return, except for the following pairs, where a change must be completed
  * when receiving the second callback in each pair:
@@ -463,35 +468,36 @@ typedef svn_error_t *(*svn_editor_cb_add
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_props(), svn_editor_t.
+/** @see svn_editor_alter_directory(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_props_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_directory_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
   apr_hash_t *props,
-  svn_boolean_t complete,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_text(), svn_editor_t.
+/** @see svn_editor_alter_file(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_text_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_file_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const svn_checksum_t *checksum,
   svn_stream_t *contents,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_target(), svn_editor_t.
+/** @see svn_editor_alter_symlink(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_target_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_symlink_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const char *target,
   apr_pool_t *scratch_pool);
 
@@ -619,38 +625,38 @@ svn_editor_setcb_add_absent(svn_editor_t
                             svn_editor_cb_add_absent_t callback,
                             apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_props_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_directory_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_props(svn_editor_t *editor,
-                           svn_editor_cb_set_props_t callback,
-                           apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_directory(svn_editor_t *editor,
+                                 svn_editor_cb_alter_directory_t callback,
+                                 apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_text_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_file_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_text(svn_editor_t *editor,
-                          svn_editor_cb_set_text_t callback,
-                          apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_file(svn_editor_t *editor,
+                            svn_editor_cb_alter_file_t callback,
+                            apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_target_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_symlink_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
  * @see also svn_editor_setcb_many().
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_setcb_set_target(svn_editor_t *editor,
-                            svn_editor_cb_set_target_t callback,
-                            apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_symlink(svn_editor_t *editor,
+                               svn_editor_cb_alter_symlink_t callback,
+                               apr_pool_t *scratch_pool);
 
 /** Sets the #svn_editor_cb_delete_t callback in @a editor
  * to @a callback.
@@ -730,9 +736,9 @@ typedef struct svn_editor_cb_many_t
   svn_editor_cb_add_file_t cb_add_file;
   svn_editor_cb_add_symlink_t cb_add_symlink;
   svn_editor_cb_add_absent_t cb_add_absent;
-  svn_editor_cb_set_props_t cb_set_props;
-  svn_editor_cb_set_text_t cb_set_text;
-  svn_editor_cb_set_target_t cb_set_target;
+  svn_editor_cb_alter_directory_t cb_alter_directory;
+  svn_editor_cb_alter_file_t cb_alter_file;
+  svn_editor_cb_alter_symlink_t cb_alter_symlink;
   svn_editor_cb_delete_t cb_delete;
   svn_editor_cb_copy_t cb_copy;
   svn_editor_cb_move_t cb_move;
@@ -851,66 +857,57 @@ svn_editor_add_absent(svn_editor_t *edit
                       svn_kind_t kind,
                       svn_revnum_t replaces_rev);
 
-/** Drive @a editor's #svn_editor_cb_set_props_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_directory_t callback.
  *
- * Set or change properties on the existing node at @a relpath.  This
- * function sends *all* properties, both existing and changes.
- * ### TODO @todo What is REVISION for?
- * ### HKW: This is puzzling to me as well...
- * ###
- * ### what about "entry props"? will these still be handled via
- * ### the general prop function?
+ * ### TODO: docco
+ * ### talk about revision as "the rev I'm trying to change". probably
+ * ### INVALID for destinations of copied/moved/rotated nodes
  *
  * For a description of @a props, see svn_editor_add_file().
  *
- * @a complete must be FALSE if and only if
- * - @a relpath is a file and an svn_editor_set_text() call will follow on
- *   the same path, or
- * - @a relpath is a symbolic link and an svn_editor_set_target() call will
- *   follow on the same path.
- *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_props(svn_editor_t *editor,
-                     const char *relpath,
-                     svn_revnum_t revision,
-                     apr_hash_t *props,
-                     svn_boolean_t complete);
-
-/** Drive @a editor's #svn_editor_cb_set_text_t callback.
+svn_editor_alter_directory(svn_editor_t *editor,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           apr_hash_t *props);
+
+/** Drive @a editor's #svn_editor_cb_alter_file_t callback.
+ *
+ * ### TODO: docco
+ * ### talk about stream closure and lazy-load. same as add_file?
+ * ### checksum is for the new checksum, not the old/current.
  *
- * Set/change the text content of a file at @a relpath to @a contents
- * with checksum @a checksum.
- * ### TODO @todo Does this send the *complete* content, always?
- * ### TODO @todo What is REVISION for?
- * ### TODO @todo Who is responsible for closing the stream?
+ * For a description of @a props, see svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_text(svn_editor_t *editor,
-                    const char *relpath,
-                    svn_revnum_t revision,
-                    const svn_checksum_t *checksum,
-                    svn_stream_t *contents);
+svn_editor_alter_file(svn_editor_t *editor,
+                      const char *relpath,
+                      svn_revnum_t revision,
+                      apr_hash_t *props,
+                      const svn_checksum_t *checksum,
+                      svn_stream_t *stream);
 
-/** Drive @a editor's #svn_editor_cb_set_target_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_symlink_t callback.
+ *
+ * ### TODO: docco
  *
- * Set/change the link target that a symbolic link at @a relpath points at
- * to @a target.
- * ### TODO @todo What is REVISION for?
+ * For a description of @a props, see svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_target(svn_editor_t *editor,
-                      const char *relpath,
-                      svn_revnum_t revision,
-                      const char *target);
+svn_editor_alter_symlink(svn_editor_t *editor,
+                         const char *relpath,
+                         svn_revnum_t revision,
+                         apr_hash_t *props,
+                         const char *target);
 
 /** Drive @a editor's #svn_editor_cb_delete_t callback.
  *

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1240370&r1=1240369&r2=1240370&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Fri Feb  3 22:07:31 2012
@@ -85,8 +85,8 @@ svn_compat_wrap_file_rev_handler(svn_fil
 /* The following code maps the calls to a traditional delta editor to an
  * Editorv2 editor.  It does this by keeping track of a lot of state, and
  * then communicating that state to Ev2 upon closure of the file or dir (or
- * edit).  Note that Ev2 calls add_symlink() and set_target() are not present
- * in the delta editor paradigm, so we never call them.
+ * edit).  Note that Ev2 calls add_symlink() and alter_symlink() are not
+ * present in the delta editor paradigm, so we never call them.
  *
  * The general idea here is that we have to see *all* the actions on a node's
  * parent before we can process that node, which means we need to buffer a
@@ -399,6 +399,9 @@ process_actions(void *edit_baton,
                               delete_revnum));
     }
 
+#if 0
+  /* ### need to fix this up. call alter_directory or alter_file. pass
+     ### NULL if PROPS or CONTENTS will be unchanged.  */
   if (props)
     {
       /* We fetched and modified the props in some way. Apply 'em now that
@@ -413,6 +416,7 @@ process_actions(void *edit_baton,
       SVN_ERR(svn_editor_set_text(eb->editor, path, text_base_revision,
                                   checksum, contents));
     }
+#endif
 
   return SVN_NO_ERROR;
 }
@@ -1285,38 +1289,42 @@ add_absent_cb(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_props_t */
+/* This implements svn_editor_cb_alter_directory_t */
 static svn_error_t *
-set_props_cb(void *baton,
-             const char *relpath,
-             svn_revnum_t revision,
-             apr_hash_t *props,
-             svn_boolean_t complete,
-             apr_pool_t *scratch_pool)
+alter_directory_cb(void *baton,
+                   const char *relpath,
+                   svn_revnum_t revision,
+                   apr_hash_t *props,
+                   apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
 
-  SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_unknown,
+  /* ### should we verify the kind is truly a directory?  */
+
+  SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_dir,
                 NULL, SVN_INVALID_REVNUM,
                 props, NULL, NULL, revision, scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_text_t */
+/* This implements svn_editor_cb_alter_file_t */
 static svn_error_t *
-set_text_cb(void *baton,
-            const char *relpath,
-            svn_revnum_t revision,
-            const svn_checksum_t *checksum,
-            svn_stream_t *contents,
-            apr_pool_t *scratch_pool)
+alter_file_cb(void *baton,
+              const char *relpath,
+              svn_revnum_t revision,
+              apr_hash_t *props,
+              const svn_checksum_t *checksum,
+              svn_stream_t *contents,
+              apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
   const char *tmp_filename;
   svn_stream_t *tmp_stream;
   svn_checksum_t *md5_checksum;
 
+  /* ### should we verify the kind is truly a file?  */
+
   /* We may need to re-checksum these contents */
   if (!(checksum && checksum->kind == svn_checksum_md5))
     contents = svn_stream_checksummed2(contents, &md5_checksum, NULL,
@@ -1332,21 +1340,26 @@ set_text_cb(void *baton,
 
   SVN_ERR(build(eb, ACTION_PUT, relpath, svn_kind_file,
                 NULL, SVN_INVALID_REVNUM,
-                NULL, tmp_filename, md5_checksum, revision, scratch_pool));
+                props, tmp_filename, md5_checksum, revision, scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_target_t */
+/* This implements svn_editor_cb_alter_symlink_t */
 static svn_error_t *
-set_target_cb(void *baton,
-              const char *relpath,
-              svn_revnum_t revision,
-              const char *target,
-              apr_pool_t *scratch_pool)
+alter_symlink_cb(void *baton,
+                 const char *relpath,
+                 svn_revnum_t revision,
+                 apr_hash_t *props,
+                 const char *target,
+                 apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
 
+  /* ### should we verify the kind is truly a symlink?  */
+
+  /* ### do something  */
+
   return SVN_NO_ERROR;
 }
 
@@ -1767,9 +1780,9 @@ editor_from_delta(svn_editor_t **editor_
       add_file_cb,
       add_symlink_cb,
       add_absent_cb,
-      set_props_cb,
-      set_text_cb,
-      set_target_cb,
+      alter_directory_cb,
+      alter_file_cb,
+      alter_symlink_cb,
       delete_cb,
       copy_cb,
       move_cb,

Modified: subversion/trunk/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/editor.c?rev=1240370&r1=1240369&r2=1240370&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/editor.c (original)
+++ subversion/trunk/subversion/libsvn_delta/editor.c Fri Feb  3 22:07:31 2012
@@ -57,7 +57,6 @@ struct svn_editor_t
 #ifdef ENABLE_ORDERING_CHECK
   apr_hash_t *pending_incomplete_children;
   apr_hash_t *completed_nodes;
-  apr_hash_t *needs_text_or_target;
   svn_boolean_t finished;
 
   apr_pool_t *result_pool;
@@ -82,7 +81,6 @@ svn_editor_create(svn_editor_t **editor,
 #ifdef ENABLE_ORDERING_CHECK
   (*editor)->pending_incomplete_children = apr_hash_make(result_pool);
   (*editor)->completed_nodes = apr_hash_make(result_pool);
-  (*editor)->needs_text_or_target = apr_hash_make(result_pool);
   (*editor)->finished = FALSE;
   (*editor)->result_pool = result_pool;
 #endif
@@ -132,31 +130,31 @@ svn_editor_setcb_add_absent(svn_editor_t
 
 
 svn_error_t *
-svn_editor_setcb_set_props(svn_editor_t *editor,
-                           svn_editor_cb_set_props_t callback,
-                           apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_directory(svn_editor_t *editor,
+                                 svn_editor_cb_alter_directory_t callback,
+                                 apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_props = callback;
+  editor->funcs.cb_alter_directory = callback;
   return SVN_NO_ERROR;
 }
 
 
 svn_error_t *
-svn_editor_setcb_set_text(svn_editor_t *editor,
-                          svn_editor_cb_set_text_t callback,
-                          apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_file(svn_editor_t *editor,
+                            svn_editor_cb_alter_file_t callback,
+                            apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_text = callback;
+  editor->funcs.cb_alter_file = callback;
   return SVN_NO_ERROR;
 }
 
 
 svn_error_t *
-svn_editor_setcb_set_target(svn_editor_t *editor,
-                            svn_editor_cb_set_target_t callback,
-                            apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_symlink(svn_editor_t *editor,
+                               svn_editor_cb_alter_symlink_t callback,
+                               apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_target = callback;
+  editor->funcs.cb_alter_symlink = callback;
   return SVN_NO_ERROR;
 }
 
@@ -232,9 +230,9 @@ svn_editor_setcb_many(svn_editor_t *edit
   COPY_CALLBACK(cb_add_file);
   COPY_CALLBACK(cb_add_symlink);
   COPY_CALLBACK(cb_add_absent);
-  COPY_CALLBACK(cb_set_props);
-  COPY_CALLBACK(cb_set_text);
-  COPY_CALLBACK(cb_set_target);
+  COPY_CALLBACK(cb_alter_directory);
+  COPY_CALLBACK(cb_alter_file);
+  COPY_CALLBACK(cb_alter_symlink);
   COPY_CALLBACK(cb_delete);
   COPY_CALLBACK(cb_copy);
   COPY_CALLBACK(cb_move);
@@ -395,11 +393,10 @@ svn_editor_add_absent(svn_editor_t *edit
 
 
 svn_error_t *
-svn_editor_set_props(svn_editor_t *editor,
-                     const char *relpath,
-                     svn_revnum_t revision,
-                     apr_hash_t *props,
-                     svn_boolean_t complete)
+svn_editor_alter_directory(svn_editor_t *editor,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           apr_hash_t *props)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -412,24 +409,14 @@ svn_editor_set_props(svn_editor_t *edito
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_props)
-    err = editor->funcs.cb_set_props(editor->baton, relpath, revision, props,
-                                     complete, editor->scratch_pool);
+  if (editor->funcs.cb_alter_directory)
+    err = editor->funcs.cb_alter_directory(editor->baton,
+                                           relpath, revision, props,
+                                           editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  /* ### Some of the ordering here depends upon the kind of RELPATH, but
-   * ### we have no way of determining what that is. */
-  if (complete)
-    {
-      apr_hash_set(editor->completed_nodes,
-                   apr_pstrdup(editor->result_pool, relpath),
-                   APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
-    }
-  else
-    {
-      apr_hash_set(editor->needs_text_or_target,
-                   apr_pstrdup(editor->result_pool, relpath),
-                   APR_HASH_KEY_STRING, (void *) 0xba5eba11);
-    }
+  apr_hash_set(editor->completed_nodes,
+               apr_pstrdup(editor->result_pool, relpath),
+               APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
 #endif
   svn_pool_clear(editor->scratch_pool);
   return err;
@@ -437,11 +424,12 @@ svn_editor_set_props(svn_editor_t *edito
 
 
 svn_error_t *
-svn_editor_set_text(svn_editor_t *editor,
-                    const char *relpath,
-                    svn_revnum_t revision,
-                    const svn_checksum_t *checksum,
-                    svn_stream_t *contents)
+svn_editor_alter_file(svn_editor_t *editor,
+                      const char *relpath,
+                      svn_revnum_t revision,
+                      apr_hash_t *props,
+                      const svn_checksum_t *checksum,
+                      svn_stream_t *contents)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -454,12 +442,12 @@ svn_editor_set_text(svn_editor_t *editor
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_text)
-    err = editor->funcs.cb_set_text(editor->baton, relpath, revision,
-                                    checksum, contents, editor->scratch_pool);
+  if (editor->funcs.cb_alter_file)
+    err = editor->funcs.cb_alter_file(editor->baton,
+                                      relpath, revision, props,
+                                      checksum, contents,
+                                      editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  apr_hash_set(editor->needs_text_or_target, relpath, APR_HASH_KEY_STRING,
-               NULL);
   apr_hash_set(editor->completed_nodes,
                apr_pstrdup(editor->result_pool, relpath),
                APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
@@ -470,10 +458,11 @@ svn_editor_set_text(svn_editor_t *editor
 
 
 svn_error_t *
-svn_editor_set_target(svn_editor_t *editor,
-                      const char *relpath,
-                      svn_revnum_t revision,
-                      const char *target)
+svn_editor_alter_symlink(svn_editor_t *editor,
+                         const char *relpath,
+                         svn_revnum_t revision,
+                         apr_hash_t *props,
+                         const char *target)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -486,12 +475,12 @@ svn_editor_set_target(svn_editor_t *edit
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_target)
-    err = editor->funcs.cb_set_target(editor->baton, relpath, revision,
-                                      target, editor->scratch_pool);
+  if (editor->funcs.cb_alter_symlink)
+    err = editor->funcs.cb_alter_symlink(editor->baton,
+                                         relpath, revision, props,
+                                         target,
+                                         editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  apr_hash_set(editor->needs_text_or_target, relpath, APR_HASH_KEY_STRING,
-               NULL);
   apr_hash_set(editor->completed_nodes,
                apr_pstrdup(editor->result_pool, relpath),
                APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
@@ -636,7 +625,6 @@ svn_editor_complete(svn_editor_t *editor
 #ifdef ENABLE_ORDERING_CHECK
   SVN_ERR_ASSERT(!editor->finished);
   SVN_ERR_ASSERT(apr_hash_count(editor->pending_incomplete_children) == 0);
-  SVN_ERR_ASSERT(apr_hash_count(editor->needs_text_or_target) == 0);
 #endif
 
   if (editor->funcs.cb_complete)