You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2019/01/28 17:44:06 UTC

svn commit: r1852393 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/shelf.c

Author: julianfoad
Date: Mon Jan 28 17:44:06 2019
New Revision: 1852393

URL: http://svn.apache.org/viewvc?rev=1852393&view=rev
Log:
Make the new shelf-replay-to-delta-editor API public (experimental).

* subversion/include/svn_client.h,
  subversion/libsvn_client/shelf.c
  (svn_client__shelf_apply): Rename from 'shelf_replay' and make public.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/shelf.c

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1852393&r1=1852392&r2=1852393&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Mon Jan 28 17:44:06 2019
@@ -7251,6 +7251,21 @@ svn_client__shelf_unapply(svn_client__sh
                          svn_boolean_t dry_run,
                          apr_pool_t *scratch_pool);
 
+/** Send committable changes found in a shelf to a delta-editor.
+ *
+ * Push changes from the @a shelf_version subtree at @a top_relpath
+ * to @a editor : @a edit_baton.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_replay(svn_client__shelf_version_t *shelf_version,
+                         const char *top_relpath,
+                         const svn_delta_editor_t *editor,
+                         void *edit_baton,
+                         apr_pool_t *scratch_pool);
+
 /** Set @a *affected_paths to a hash with one entry for each path affected
  * by the @a shelf_version.
  *

Modified: subversion/trunk/subversion/libsvn_client/shelf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/shelf.c?rev=1852393&r1=1852392&r2=1852393&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/shelf.c (original)
+++ subversion/trunk/subversion/libsvn_client/shelf.c Mon Jan 28 17:44:06 2019
@@ -1626,20 +1626,18 @@ shelf_replay_path_visitor(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* Send committable changes found in a shelf to a delta-editor.
- */
-static svn_error_t *
-shelf_replay(svn_client__shelf_version_t *shelf_version,
-             const char *wc_relpath,
-             const svn_delta_editor_t *editor,
-             void *edit_baton,
-             apr_pool_t *scratch_pool)
+svn_error_t *
+svn_client__shelf_replay(svn_client__shelf_version_t *shelf_version,
+                         const char *top_relpath,
+                         const svn_delta_editor_t *editor,
+                         void *edit_baton,
+                         apr_pool_t *scratch_pool)
 {
   struct shelf_replay_path_baton_t baton;
   struct path_driver_cb_baton_t pdb = {0};
   svn_error_t *err;
 
-  baton.top_relpath = wc_relpath;
+  baton.top_relpath = top_relpath;
   baton.walk_root_abspath = shelf_version->files_dir_abspath;
 
   pdb.shelf_version = shelf_version;
@@ -1967,9 +1965,9 @@ svn_client__shelf_apply(svn_client__shel
                          shelf->ctx, scratch_pool));
 
   SVN_WC__CALL_WITH_WRITE_LOCK(
-    shelf_replay(shelf_version, "",
-                 editor, edit_baton,
-                 scratch_pool),
+    svn_client__shelf_replay(shelf_version, "",
+                             editor, edit_baton,
+                             scratch_pool),
     shelf->ctx->wc_ctx, shelf->wc_root_abspath,
     FALSE /*lock_anchor*/, scratch_pool);