You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2018/01/31 04:00:09 UTC

svn commit: r1822732 - in /subversion/branches/1.10.x: ./ STATUS subversion/include/svn_client.h subversion/libsvn_client/shelve.c

Author: svn-role
Date: Wed Jan 31 04:00:09 2018
New Revision: 1822732

URL: http://svn.apache.org/viewvc?rev=1822732&view=rev
Log:
Merge r1821621 from trunk:

 * r1821621
   Remove lower level shelving functions from (experimental) public API.
   Votes:
     +1: julianfoad, rhuijben, jamessan

Modified:
    subversion/branches/1.10.x/   (props changed)
    subversion/branches/1.10.x/STATUS
    subversion/branches/1.10.x/subversion/include/svn_client.h
    subversion/branches/1.10.x/subversion/libsvn_client/shelve.c

Propchange: subversion/branches/1.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 31 04:00:09 2018
@@ -99,4 +99,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820046-1820047,1820518,1820718,1821183,1821224
+/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820046-1820047,1820518,1820718,1821183,1821224,1821621

Modified: subversion/branches/1.10.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1822732&r1=1822731&r2=1822732&view=diff
==============================================================================
--- subversion/branches/1.10.x/STATUS (original)
+++ subversion/branches/1.10.x/STATUS Wed Jan 31 04:00:09 2018
@@ -40,11 +40,6 @@ Candidate changes:
 Approved changes:
 =================
 
- * r1821621
-   Remove lower level shelving functions from (experimental) public API.
-   Votes:
-     +1: julianfoad, rhuijben, jamessan
-
  * r1821678
    Encode the shelf name to ensure a valid filename for the patch file.
    Votes:

Modified: subversion/branches/1.10.x/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/include/svn_client.h?rev=1822732&r1=1822731&r2=1822732&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/include/svn_client.h (original)
+++ subversion/branches/1.10.x/subversion/include/svn_client.h Wed Jan 31 04:00:09 2018
@@ -6860,65 +6860,6 @@ svn_client_shelf_has_changes(svn_boolean
                              svn_client_ctx_t *ctx,
                              apr_pool_t *scratch_pool);
 
-/** Write local changes to a patch file for shelved change @a name.
- *
- * @a message: An optional log message.
- *
- * @a wc_root_abspath: The WC root dir.
- *
- * @a overwrite_existing: If a file at @a patch_abspath exists, overwrite it.
- *
- * @a paths, @a depth, @a changelists: The selection of local paths to diff.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelf_write_patch(const char *name,
-                             const char *message,
-                             const char *wc_root_abspath,
-                             svn_boolean_t overwrite_existing,
-                             const apr_array_header_t *paths,
-                             svn_depth_t depth,
-                             const apr_array_header_t *changelists,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool);
-
-/** Apply the patch file for shelved change @a name to the WC.
- *
- * @a wc_root_abspath: The WC root dir.
- *
- * @a reverse: Apply the patch in reverse.
- *
- * @a dry_run: Don't really apply the changes, just notify what would be done.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelf_apply_patch(const char *name,
-                             const char *wc_root_abspath,
-                             svn_boolean_t reverse,
-                             svn_boolean_t dry_run,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool);
-
-/** Delete the patch file for shelved change @a name.
- *
- * @a wc_root_abspath: The WC root dir.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelf_delete_patch(const char *name,
-                              const char *wc_root_abspath,
-                              svn_client_ctx_t *ctx,
-                              apr_pool_t *scratch_pool);
-
 /** @} */
 
 /** Changelist commands

Modified: subversion/branches/1.10.x/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/libsvn_client/shelve.c?rev=1822732&r1=1822731&r2=1822732&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/libsvn_client/shelve.c (original)
+++ subversion/branches/1.10.x/subversion/libsvn_client/shelve.c Wed Jan 31 04:00:09 2018
@@ -36,6 +36,7 @@
 #include "svn_utf.h"
 
 #include "client.h"
+#include "private/svn_client_private.h"
 #include "private/svn_wc_private.h"
 #include "svn_private_config.h"
 
@@ -73,16 +74,26 @@ get_patch_abspath(char **patch_abspath,
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_write_patch(const char *name,
-                             const char *message,
-                             const char *wc_root_abspath,
-                             svn_boolean_t overwrite_existing,
-                             const apr_array_header_t *paths,
-                             svn_depth_t depth,
-                             const apr_array_header_t *changelists,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool)
+/** Write local changes to a patch file for shelved change @a name.
+ *
+ * @a message: An optional log message.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ *
+ * @a overwrite_existing: If a file at @a patch_abspath exists, overwrite it.
+ *
+ * @a paths, @a depth, @a changelists: The selection of local paths to diff.
+ */
+static svn_error_t *
+shelf_write_patch(const char *name,
+                  const char *message,
+                  const char *wc_root_abspath,
+                  svn_boolean_t overwrite_existing,
+                  const apr_array_header_t *paths,
+                  svn_depth_t depth,
+                  const apr_array_header_t *changelists,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *scratch_pool)
 {
   char *patch_abspath;
   apr_int32_t flag;
@@ -158,13 +169,21 @@ svn_client_shelf_write_patch(const char
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_apply_patch(const char *name,
-                             const char *wc_root_abspath,
-                             svn_boolean_t reverse,
-                             svn_boolean_t dry_run,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool)
+/** Apply the patch file for shelved change @a name to the WC.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ *
+ * @a reverse: Apply the patch in reverse.
+ *
+ * @a dry_run: Don't really apply the changes, just notify what would be done.
+ */
+static svn_error_t *
+shelf_apply_patch(const char *name,
+                  const char *wc_root_abspath,
+                  svn_boolean_t reverse,
+                  svn_boolean_t dry_run,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *scratch_pool)
 {
   char *patch_abspath;
 
@@ -180,11 +199,15 @@ svn_client_shelf_apply_patch(const char
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_delete_patch(const char *name,
-                              const char *wc_root_abspath,
-                              svn_client_ctx_t *ctx,
-                              apr_pool_t *scratch_pool)
+/** Delete the patch file for shelved change @a name.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ */
+static svn_error_t *
+shelf_delete_patch(const char *name,
+                   const char *wc_root_abspath,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *scratch_pool)
 {
   char *patch_abspath, *to_abspath;
 
@@ -237,10 +260,10 @@ svn_client_shelve(const char *name,
         return SVN_NO_ERROR;
     }
 
-  err = svn_client_shelf_write_patch(name, message, wc_root_abspath,
-                                     FALSE /*overwrite_existing*/,
-                                     paths, depth, changelists,
-                                     ctx, pool);
+  err = shelf_write_patch(name, message, wc_root_abspath,
+                          FALSE /*overwrite_existing*/,
+                          paths, depth, changelists,
+                          ctx, pool);
   if (err && APR_STATUS_IS_EEXIST(err->apr_err))
     {
       return svn_error_quick_wrapf(err,
@@ -254,15 +277,15 @@ svn_client_shelve(const char *name,
     {
       /* Reverse-apply the patch. This should be a safer way to remove those
          changes from the WC than running a 'revert' operation. */
-      SVN_ERR(svn_client_shelf_apply_patch(name, wc_root_abspath,
-                                           TRUE /*reverse*/, dry_run,
-                                           ctx, pool));
+      SVN_ERR(shelf_apply_patch(name, wc_root_abspath,
+                                TRUE /*reverse*/, dry_run,
+                                ctx, pool));
     }
 
   if (dry_run)
     {
-      SVN_ERR(svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                            ctx, pool));
+      SVN_ERR(shelf_delete_patch(name, wc_root_abspath,
+                                 ctx, pool));
     }
 
   return SVN_NO_ERROR;
@@ -285,9 +308,9 @@ svn_client_unshelve(const char *name,
                                  local_abspath, ctx, pool, pool));
 
   /* Apply the patch. */
-  err = svn_client_shelf_apply_patch(name, wc_root_abspath,
-                                     FALSE /*reverse*/, dry_run,
-                                     ctx, pool);
+  err = shelf_apply_patch(name, wc_root_abspath,
+                          FALSE /*reverse*/, dry_run,
+                          ctx, pool);
   if (err && err->apr_err == SVN_ERR_ILLEGAL_TARGET)
     {
       return svn_error_quick_wrapf(err,
@@ -300,8 +323,8 @@ svn_client_unshelve(const char *name,
   /* Remove the patch. */
   if (! keep && ! dry_run)
     {
-      SVN_ERR(svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                            ctx, pool));
+      SVN_ERR(shelf_delete_patch(name, wc_root_abspath,
+                                 ctx, pool));
     }
 
   return SVN_NO_ERROR;
@@ -326,8 +349,8 @@ svn_client_shelves_delete(const char *na
     {
       svn_error_t *err;
 
-      err = svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                          ctx, pool);
+      err = shelf_delete_patch(name, wc_root_abspath,
+                               ctx, pool);
       if (err && APR_STATUS_IS_ENOENT(err->apr_err))
         {
           return svn_error_quick_wrapf(err,