subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1852527 - in /subversion/trunk/subversion: libsvn_client/add.c libsvn_client/commit_util.c libsvn_client/copy.c libsvn_delta/branch_compat.c libsvn_delta/compat.c libsvn_repos/replay.c
Date Wed, 30 Jan 2019 14:44:19 GMT
Author: julianfoad
Date: Wed Jan 30 14:44:18 2019
New Revision: 1852527

URL: http://svn.apache.org/viewvc?rev=1852527&view=rev
Log:
Upgrade uses of the editor path driver callback, following r1852526.

* subversion/libsvn_client/add.c
  (path_driver_cb_func): Take the editor and edit-baton as direct parameters.
  (mkdir_urls): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_client/commit_util.c
  (item_commit_baton): Remove the editor and edit-baton from here.
  (do_item_commit): Take the editor and edit-baton as direct parameters.
  (svn_client__do_commit): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_client/copy.c
  (path_driver_cb_baton): Remove the editor and edit-baton from here.
  (path_driver_cb_func): Take the editor and edit-baton as direct parameters.
  (repos_to_repos_copy): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_delta/branch_compat.c
  (apply_change): Take the editor and edit-baton as direct parameters.
  (drive_changes): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_delta/compat.c
  (apply_change): Take the editor and edit-baton as direct parameters.
  (drive_changes): Upgrade to svn_delta_path_driver3.

* subversion/libsvn_repos/replay.c
  (path_driver_cb_baton): Remove the editor and edit-baton from here.
  (path_driver_cb_func): Take the editor and edit-baton as direct parameters.
  (svn_repos_replay2): Upgrade to svn_delta_path_driver3.

Modified:
    subversion/trunk/subversion/libsvn_client/add.c
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/libsvn_client/copy.c
    subversion/trunk/subversion/libsvn_delta/branch_compat.c
    subversion/trunk/subversion/libsvn_delta/compat.c
    subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Wed Jan 30 14:44:18 2019
@@ -983,12 +983,13 @@ svn_client_add5(const char *path,
 
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
+                    const svn_delta_editor_t *editor,
+                    void *edit_baton,
                     void *parent_baton,
                     void *callback_baton,
                     const char *path,
                     apr_pool_t *pool)
 {
-  const svn_delta_editor_t *editor = callback_baton;
   SVN_ERR(svn_path_check_valid(path, pool));
   return editor->add_directory(path, parent_baton, NULL,
                                SVN_INVALID_REVNUM, pool, dir_baton);
@@ -1177,8 +1178,8 @@ mkdir_urls(const apr_array_header_t *url
 
   /* Call the path-based editor driver. */
   err = svn_error_trace(
-        svn_delta_path_driver2(editor, edit_baton, targets, TRUE,
-                               path_driver_cb_func, (void *)editor, pool));
+        svn_delta_path_driver3(editor, edit_baton, targets, TRUE,
+                               path_driver_cb_func, NULL, pool));
 
   if (err)
     {

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Wed Jan 30 14:44:18 2019
@@ -1524,8 +1524,6 @@ struct file_mod_t
 /* A baton for use while driving a path-based editor driver for commit */
 struct item_commit_baton
 {
-  const svn_delta_editor_t *editor;    /* commit editor */
-  void *edit_baton;                    /* commit editor's baton */
   apr_hash_t *file_mods;               /* hash: path->file_mod_t */
   const char *notify_path_prefix;      /* notification path prefix
                                           (NULL is okay, else abs path) */
@@ -1547,6 +1545,8 @@ struct item_commit_baton
  * This implements svn_delta_path_driver_cb_func_t. */
 static svn_error_t *
 do_item_commit(void **dir_baton,
+               const svn_delta_editor_t *editor,
+               void *edit_baton,
                void *parent_baton,
                void *callback_baton,
                const char *path,
@@ -1558,7 +1558,6 @@ do_item_commit(void **dir_baton,
   svn_node_kind_t kind = item->kind;
   void *file_baton = NULL;
   apr_pool_t *file_pool = NULL;
-  const svn_delta_editor_t *editor = icb->editor;
   apr_hash_t *file_mods = icb->file_mods;
   svn_client_ctx_t *ctx = icb->ctx;
   svn_error_t *err;
@@ -1760,7 +1759,7 @@ do_item_commit(void **dir_baton,
             {
               if (! parent_baton)
                 {
-                  err = editor->open_root(icb->edit_baton, item->revision,
+                  err = editor->open_root(edit_baton, item->revision,
                                           pool, dir_baton);
                 }
               else
@@ -1894,8 +1893,6 @@ svn_client__do_commit(const char *base_u
     }
 
   /* Setup the callback baton. */
-  cb_baton.editor = editor;
-  cb_baton.edit_baton = edit_baton;
   cb_baton.file_mods = file_mods;
   cb_baton.notify_path_prefix = notify_path_prefix;
   cb_baton.ctx = ctx;
@@ -1903,7 +1900,7 @@ svn_client__do_commit(const char *base_u
   cb_baton.base_url = base_url;
 
   /* Drive the commit editor! */
-  SVN_ERR(svn_delta_path_driver2(editor, edit_baton, paths, TRUE,
+  SVN_ERR(svn_delta_path_driver3(editor, edit_baton, paths, TRUE,
                                  do_item_commit, &cb_baton, scratch_pool));
 
   /* Transmit outstanding text deltas. */

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Wed Jan 30 14:44:18 2019
@@ -1158,10 +1158,6 @@ typedef struct path_driver_info_t
    or move operation. */
 struct path_driver_cb_baton
 {
-  /* The editor (and its state) used to perform the operation. */
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
-
   /* A hash of path -> path_driver_info_t *'s. */
   apr_hash_t *action_hash;
 
@@ -1171,6 +1167,8 @@ struct path_driver_cb_baton
 
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
+                    const svn_delta_editor_t *editor,
+                    void *edit_baton,
                     void *parent_baton,
                     void *callback_baton,
                     const char *path,
@@ -1191,9 +1189,9 @@ path_driver_cb_func(void **dir_baton,
   /* Check to see if we need to add the path as a parent directory. */
   if (path_info->dir_add)
     {
-      return cb_baton->editor->add_directory(path, parent_baton, NULL,
-                                             SVN_INVALID_REVNUM, pool,
-                                             dir_baton);
+      return editor->add_directory(path, parent_baton, NULL,
+                                   SVN_INVALID_REVNUM, pool,
+                                   dir_baton);
     }
 
   /* If this is a resurrection, we know the source and dest paths are
@@ -1225,8 +1223,8 @@ path_driver_cb_func(void **dir_baton,
 
   if (do_delete)
     {
-      SVN_ERR(cb_baton->editor->delete_entry(path, SVN_INVALID_REVNUM,
-                                             parent_baton, pool));
+      SVN_ERR(editor->delete_entry(path, SVN_INVALID_REVNUM,
+                                   parent_baton, pool));
     }
   if (do_add)
     {
@@ -1235,40 +1233,40 @@ path_driver_cb_func(void **dir_baton,
       if (path_info->src_kind == svn_node_file)
         {
           void *file_baton;
-          SVN_ERR(cb_baton->editor->add_file(path, parent_baton,
-                                             path_info->src_url,
-                                             path_info->src_revnum,
-                                             pool, &file_baton));
+          SVN_ERR(editor->add_file(path, parent_baton,
+                                   path_info->src_url,
+                                   path_info->src_revnum,
+                                   pool, &file_baton));
           if (path_info->mergeinfo)
-            SVN_ERR(cb_baton->editor->change_file_prop(file_baton,
-                                                       SVN_PROP_MERGEINFO,
-                                                       path_info->mergeinfo,
-                                                       pool));
-          SVN_ERR(cb_baton->editor->close_file(file_baton, NULL, pool));
+            SVN_ERR(editor->change_file_prop(file_baton,
+                                             SVN_PROP_MERGEINFO,
+                                             path_info->mergeinfo,
+                                             pool));
+          SVN_ERR(editor->close_file(file_baton, NULL, pool));
         }
       else
         {
-          SVN_ERR(cb_baton->editor->add_directory(path, parent_baton,
-                                                  path_info->src_url,
-                                                  path_info->src_revnum,
-                                                  pool, dir_baton));
+          SVN_ERR(editor->add_directory(path, parent_baton,
+                                        path_info->src_url,
+                                        path_info->src_revnum,
+                                        pool, dir_baton));
           if (path_info->mergeinfo)
-            SVN_ERR(cb_baton->editor->change_dir_prop(*dir_baton,
-                                                      SVN_PROP_MERGEINFO,
-                                                      path_info->mergeinfo,
-                                                      pool));
+            SVN_ERR(editor->change_dir_prop(*dir_baton,
+                                            SVN_PROP_MERGEINFO,
+                                            path_info->mergeinfo,
+                                            pool));
         }
     }
 
   if (path_info->externals)
     {
       if (*dir_baton == NULL)
-        SVN_ERR(cb_baton->editor->open_directory(path, parent_baton,
-                                                 SVN_INVALID_REVNUM,
-                                                 pool, dir_baton));
+        SVN_ERR(editor->open_directory(path, parent_baton,
+                                       SVN_INVALID_REVNUM,
+                                       pool, dir_baton));
 
-      SVN_ERR(cb_baton->editor->change_dir_prop(*dir_baton, SVN_PROP_EXTERNALS,
-                                                path_info->externals, pool));
+      SVN_ERR(editor->change_dir_prop(*dir_baton, SVN_PROP_EXTERNALS,
+                                      path_info->externals, pool));
     }
 
   return SVN_NO_ERROR;
@@ -1852,13 +1850,11 @@ repos_to_repos_copy(const apr_array_head
                                     pool));
 
   /* Setup the callback baton. */
-  cb_baton.editor = editor;
-  cb_baton.edit_baton = edit_baton;
   cb_baton.action_hash = action_hash;
   cb_baton.is_move = is_move;
 
   /* Call the path-based editor driver. */
-  err = svn_delta_path_driver2(editor, edit_baton, paths, TRUE,
+  err = svn_delta_path_driver3(editor, edit_baton, paths, TRUE,
                                path_driver_cb_func, &cb_baton, pool);
   if (err)
     {

Modified: subversion/trunk/subversion/libsvn_delta/branch_compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/branch_compat.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/branch_compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/branch_compat.c Wed Jan 30 14:44:18 2019
@@ -875,6 +875,8 @@ drive_ev1_props(const char *repos_relpat
  */
 static svn_error_t *
 apply_change(void **dir_baton,
+             const svn_delta_editor_t *editor,
+             void *edit_baton,
              void *parent_baton,
              void *callback_baton,
              const char *ev1_relpath,
@@ -905,7 +907,7 @@ apply_change(void **dir_baton,
       /* Only property edits are allowed on the root.  */
       SVN_ERR_ASSERT(change->action == RESTRUCTURE_NONE);
       SVN_ERR(drive_ev1_props(ev1_relpath, change, base_props,
-                              eb->deditor, *dir_baton, scratch_pool));
+                              editor, *dir_baton, scratch_pool));
 
       /* No further action possible for the root.  */
       return SVN_NO_ERROR;
@@ -913,8 +915,8 @@ apply_change(void **dir_baton,
 
   if (change->action == RESTRUCTURE_DELETE)
     {
-      SVN_ERR(eb->deditor->delete_entry(ev1_relpath, change->deleting_rev,
-                                        parent_baton, scratch_pool));
+      SVN_ERR(editor->delete_entry(ev1_relpath, change->deleting_rev,
+                                   parent_baton, scratch_pool));
 
       /* No futher action possible for this node.  */
       return SVN_NO_ERROR;
@@ -927,11 +929,11 @@ apply_change(void **dir_baton,
   if (change->action == RESTRUCTURE_ADD_ABSENT)
     {
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->absent_directory(ev1_relpath, parent_baton,
-                                              scratch_pool));
-      else if (change->kind == svn_node_file)
-        SVN_ERR(eb->deditor->absent_file(ev1_relpath, parent_baton,
+        SVN_ERR(editor->absent_directory(ev1_relpath, parent_baton,
                                          scratch_pool));
+      else if (change->kind == svn_node_file)
+        SVN_ERR(editor->absent_file(ev1_relpath, parent_baton,
+                                    scratch_pool));
       else
         SVN_ERR_MALFUNCTION();
 
@@ -948,8 +950,8 @@ apply_change(void **dir_baton,
 
       /* Do we have an old node to delete first? If so, delete it. */
       if (change->deleting)
-        SVN_ERR(eb->deditor->delete_entry(ev1_relpath, change->deleting_rev,
-                                          parent_baton, scratch_pool));
+        SVN_ERR(editor->delete_entry(ev1_relpath, change->deleting_rev,
+                                     parent_baton, scratch_pool));
 
       /* If it's a copy, determine the copy source location. */
       if (change->copyfrom_path)
@@ -974,13 +976,13 @@ apply_change(void **dir_baton,
         }
 
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->add_directory(ev1_relpath, parent_baton,
-                                           copyfrom_url, copyfrom_rev,
-                                           result_pool, dir_baton));
-      else if (change->kind == svn_node_file)
-        SVN_ERR(eb->deditor->add_file(ev1_relpath, parent_baton,
+        SVN_ERR(editor->add_directory(ev1_relpath, parent_baton,
                                       copyfrom_url, copyfrom_rev,
-                                      result_pool, &file_baton));
+                                      result_pool, dir_baton));
+      else if (change->kind == svn_node_file)
+        SVN_ERR(editor->add_file(ev1_relpath, parent_baton,
+                                 copyfrom_url, copyfrom_rev,
+                                 result_pool, &file_baton));
       else
         SVN_ERR_MALFUNCTION();
     }
@@ -993,13 +995,13 @@ apply_change(void **dir_baton,
          when we fetch the base properties.) */
 
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->open_directory(ev1_relpath, parent_baton,
-                                            change->changing_rev,
-                                            result_pool, dir_baton));
-      else if (change->kind == svn_node_file)
-        SVN_ERR(eb->deditor->open_file(ev1_relpath, parent_baton,
+        SVN_ERR(editor->open_directory(ev1_relpath, parent_baton,
                                        change->changing_rev,
-                                       result_pool, &file_baton));
+                                       result_pool, dir_baton));
+      else if (change->kind == svn_node_file)
+        SVN_ERR(editor->open_file(ev1_relpath, parent_baton,
+                                  change->changing_rev,
+                                  result_pool, &file_baton));
       else
         SVN_ERR_MALFUNCTION();
     }
@@ -1007,10 +1009,10 @@ apply_change(void **dir_baton,
   /* Apply any properties in CHANGE to the node.  */
   if (change->kind == svn_node_dir)
     SVN_ERR(drive_ev1_props(ev1_relpath, change, base_props,
-                            eb->deditor, *dir_baton, scratch_pool));
+                            editor, *dir_baton, scratch_pool));
   else
     SVN_ERR(drive_ev1_props(ev1_relpath, change, base_props,
-                            eb->deditor, file_baton, scratch_pool));
+                            editor, file_baton, scratch_pool));
 
   /* Send the text content delta, if new text content is provided. */
   if (change->contents_text)
@@ -1023,7 +1025,7 @@ apply_change(void **dir_baton,
                                               scratch_pool);
       /* ### would be nice to have a BASE_CHECKSUM, but hey: this is the
          ### shim code...  */
-      SVN_ERR(eb->deditor->apply_textdelta(file_baton, NULL, scratch_pool,
+      SVN_ERR(editor->apply_textdelta(file_baton, NULL, scratch_pool,
                                            &handler, &handler_baton));
       /* ### it would be nice to send a true txdelta here, but whatever.  */
       SVN_ERR(svn_txdelta_send_stream(read_stream, handler, handler_baton,
@@ -1033,7 +1035,7 @@ apply_change(void **dir_baton,
 
   if (file_baton)
     {
-      SVN_ERR(eb->deditor->close_file(file_baton, NULL, scratch_pool));
+      SVN_ERR(editor->close_file(file_baton, NULL, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -1740,7 +1742,7 @@ drive_changes(svn_branch__txn_priv_t *eb
 
   /* Apply the appropriate Ev1 change to each Ev1-relative path. */
   paths = get_unsorted_paths(eb->changes, scratch_pool);
-  SVN_ERR(svn_delta_path_driver2(eb->deditor, eb->dedit_baton,
+  SVN_ERR(svn_delta_path_driver3(eb->deditor, eb->dedit_baton,
                                  paths, TRUE /*sort*/,
                                  apply_change, (void *)eb,
                                  scratch_pool));

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Wed Jan 30 14:44:18 2019
@@ -1577,6 +1577,8 @@ drive_ev1_props(const struct editor_bato
 /* Conforms to svn_delta_path_driver_cb_func_t  */
 static svn_error_t *
 apply_change(void **dir_baton,
+             const svn_delta_editor_t *deditor,
+             void *dedit_baton,
              void *parent_baton,
              void *callback_baton,
              const char *ev1_relpath,
@@ -1614,8 +1616,8 @@ apply_change(void **dir_baton,
 
   if (change->action == RESTRUCTURE_DELETE)
     {
-      SVN_ERR(eb->deditor->delete_entry(ev1_relpath, change->deleting,
-                                        parent_baton, scratch_pool));
+      SVN_ERR(deditor->delete_entry(ev1_relpath, change->deleting,
+                                    parent_baton, scratch_pool));
 
       /* No futher action possible for this node.  */
       return SVN_NO_ERROR;
@@ -1627,11 +1629,11 @@ apply_change(void **dir_baton,
   if (change->action == RESTRUCTURE_ADD_ABSENT)
     {
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->absent_directory(ev1_relpath, parent_baton,
-                                              scratch_pool));
+        SVN_ERR(deditor->absent_directory(ev1_relpath, parent_baton,
+                                          scratch_pool));
       else
-        SVN_ERR(eb->deditor->absent_file(ev1_relpath, parent_baton,
-                                         scratch_pool));
+        SVN_ERR(deditor->absent_file(ev1_relpath, parent_baton,
+                                     scratch_pool));
 
       /* No further action possible for this node.  */
       return SVN_NO_ERROR;
@@ -1645,8 +1647,8 @@ apply_change(void **dir_baton,
 
       /* Do we have an old node to delete first?  */
       if (SVN_IS_VALID_REVNUM(change->deleting))
-        SVN_ERR(eb->deditor->delete_entry(ev1_relpath, change->deleting,
-                                          parent_baton, scratch_pool));
+        SVN_ERR(deditor->delete_entry(ev1_relpath, change->deleting,
+                                      parent_baton, scratch_pool));
 
       /* Are we copying the node from somewhere?  */
       if (change->copyfrom_path)
@@ -1669,24 +1671,24 @@ apply_change(void **dir_baton,
         }
 
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->add_directory(ev1_relpath, parent_baton,
-                                           copyfrom_url, copyfrom_rev,
-                                           result_pool, dir_baton));
+        SVN_ERR(deditor->add_directory(ev1_relpath, parent_baton,
+                                       copyfrom_url, copyfrom_rev,
+                                       result_pool, dir_baton));
       else
-        SVN_ERR(eb->deditor->add_file(ev1_relpath, parent_baton,
-                                      copyfrom_url, copyfrom_rev,
-                                      result_pool, &file_baton));
+        SVN_ERR(deditor->add_file(ev1_relpath, parent_baton,
+                                  copyfrom_url, copyfrom_rev,
+                                  result_pool, &file_baton));
     }
   else
     {
       if (change->kind == svn_node_dir)
-        SVN_ERR(eb->deditor->open_directory(ev1_relpath, parent_baton,
-                                            change->changing,
-                                            result_pool, dir_baton));
+        SVN_ERR(deditor->open_directory(ev1_relpath, parent_baton,
+                                        change->changing,
+                                        result_pool, dir_baton));
       else
-        SVN_ERR(eb->deditor->open_file(ev1_relpath, parent_baton,
-                                       change->changing,
-                                       result_pool, &file_baton));
+        SVN_ERR(deditor->open_file(ev1_relpath, parent_baton,
+                                   change->changing,
+                                   result_pool, &file_baton));
     }
 
   /* Apply any properties in CHANGE to the node.  */
@@ -1703,8 +1705,8 @@ apply_change(void **dir_baton,
 
       /* ### would be nice to have a BASE_CHECKSUM, but hey: this is the
          ### shim code...  */
-      SVN_ERR(eb->deditor->apply_textdelta(file_baton, NULL, scratch_pool,
-                                           &handler, &handler_baton));
+      SVN_ERR(deditor->apply_textdelta(file_baton, NULL, scratch_pool,
+                                       &handler, &handler_baton));
       SVN_ERR(svn_stream_open_readonly(&contents, change->contents_abspath,
                                        scratch_pool, scratch_pool));
       /* ### it would be nice to send a true txdelta here, but whatever.  */
@@ -1718,7 +1720,7 @@ apply_change(void **dir_baton,
       const char *digest = svn_checksum_to_cstring(change->checksum,
                                                    scratch_pool);
 
-      SVN_ERR(eb->deditor->close_file(file_baton, digest, scratch_pool));
+      SVN_ERR(deditor->close_file(file_baton, digest, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -1747,7 +1749,7 @@ drive_changes(const struct editor_baton
 
   /* Get a sorted list of Ev1-relative paths.  */
   paths = get_sorted_paths(eb->changes, eb->base_relpath, scratch_pool);
-  SVN_ERR(svn_delta_path_driver2(eb->deditor, eb->dedit_baton, paths,
+  SVN_ERR(svn_delta_path_driver3(eb->deditor, eb->dedit_baton, paths,
                                  FALSE, apply_change, (void *)eb,
                                  scratch_pool));
 

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1852527&r1=1852526&r2=1852527&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Wed Jan 30 14:44:18 2019
@@ -126,9 +126,6 @@ struct copy_info
 
 struct path_driver_cb_baton
 {
-  const svn_delta_editor_t *editor;
-  void *edit_baton;
-
   /* The root of the revision we're replaying. */
   svn_fs_root_t *root;
 
@@ -454,14 +451,14 @@ fill_copyfrom(svn_fs_root_t **copyfrom_r
 
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
+                    const svn_delta_editor_t *editor,
+                    void *edit_baton,
                     void *parent_baton,
                     void *callback_baton,
                     const char *edit_path,
                     apr_pool_t *pool)
 {
   struct path_driver_cb_baton *cb = callback_baton;
-  const svn_delta_editor_t *editor = cb->editor;
-  void *edit_baton = cb->edit_baton;
   svn_fs_root_t *root = cb->root;
   svn_fs_path_change3_t *change;
   svn_boolean_t do_add = FALSE, do_delete = FALSE;
@@ -957,8 +954,6 @@ svn_repos_replay2(svn_fs_root_t *root,
     low_water_mark = 0;
 
   /* Initialize our callback baton. */
-  cb_baton.editor = editor;
-  cb_baton.edit_baton = edit_baton;
   cb_baton.root = root;
   cb_baton.changed_paths = changed_paths;
   cb_baton.authz_read_func = authz_read_func;
@@ -989,7 +984,7 @@ svn_repos_replay2(svn_fs_root_t *root,
     }
 
   /* Call the path-based editor driver. */
-  return svn_delta_path_driver2(editor, edit_baton,
+  return svn_delta_path_driver3(editor, edit_baton,
                                 paths, TRUE,
                                 path_driver_cb_func, &cb_baton, pool);
 #else



Mime
View raw message