[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-commits
Subject:    svn commit: r1874632 - in /subversion/branches/decouple-shelving-cli/subversion:
From:       julianfoad () apache ! org
Date:       2020-02-28 21:15:40
Message-ID: 20200228211540.8C1C217A108 () svn01-us-east ! apache ! org
[Download RAW message or body]

Author: julianfoad
Date: Fri Feb 28 21:15:40 2020
New Revision: 1874632

URL: http://svn.apache.org/viewvc?rev=1874632&view=rev
Log:
Move the experimental shelving API declarations into a dedicated header
file.

A step towards decoupling the experimental shelving CLI from the main CLI.

* subversion/include/private/svn_client_shelf.h
  New file.

* subversion/include/svn_client.h,
  subversion/include/private/svn_client_private.h
  (svn_client__shelf_*): Move into svn_client_shelf.h.

* subversion/libsvn_client/diff.c,
  subversion/libsvn_client/shelf.c,
  subversion/libsvn_client/status.c
    Include the new header.

Modified:
    subversion/branches/decouple-shelving-cli/subversion/include/private/svn_client_private.h
  subversion/branches/decouple-shelving-cli/subversion/include/svn_client.h
    subversion/branches/decouple-shelving-cli/subversion/libsvn_client/diff.c
    subversion/branches/decouple-shelving-cli/subversion/libsvn_client/shelf.c
    subversion/branches/decouple-shelving-cli/subversion/libsvn_client/status.c
    subversion/branches/decouple-shelving-cli/subversion/svn/shelf-cmd.c

Modified: subversion/branches/decouple-shelving-cli/subversion/include/private/svn_client_private.h
                
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion \
/include/private/svn_client_private.h?rev=1874632&r1=1874631&r2=1874632&view=diff \
                ==============================================================================
                
--- subversion/branches/decouple-shelving-cli/subversion/include/private/svn_client_private.h \
                (original)
+++ subversion/branches/decouple-shelving-cli/subversion/include/private/svn_client_private.h \
Fri Feb 28 21:15:40 2020 @@ -353,22 +353,6 @@ svn_client__get_diff_writer_svn(
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool);
 
-/** Output the subtree of @a shelf_version rooted at @a shelf_relpath
- * as a diff to @a diff_processor.
- *
- * ### depth and ignore_ancestry are currently ignored.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_diff(svn_client__shelf_version_t *shelf_version,
-                       const char *shelf_relpath,
-                       svn_depth_t depth,
-                       svn_boolean_t ignore_ancestry,
-                       const svn_diff_tree_processor_t *diff_processor,
-                       apr_pool_t *scratch_pool);
-
 /*** Editor for diff summary ***/
 
 /* Set *DIFF_PROCESSOR to a diff processor that will report a diff summary

Modified: subversion/branches/decouple-shelving-cli/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion/include/svn_client.h?rev=1874632&r1=1874631&r2=1874632&view=diff
 ==============================================================================
--- subversion/branches/decouple-shelving-cli/subversion/include/svn_client.h \
                (original)
+++ subversion/branches/decouple-shelving-cli/subversion/include/svn_client.h Fri Feb \
28 21:15:40 2020 @@ -7003,436 +7003,6 @@ svn_client_cat(svn_stream_t *out,
 /** @} end group: cat */
 
 
-
-/** Shelving v2, with checkpoints
- *
- * @defgroup svn_client_shelves_checkpoints Shelves and checkpoints
- * @{
- */
-
-/** A shelf.
- *
- * @warning EXPERIMENTAL.
- */
-typedef struct svn_client__shelf_t
-{
-    /* Public fields (read-only for public use) */
-    const char *name;
-    int max_version;  /**< @deprecated */
-
-    /* Private fields */
-    const char *wc_root_abspath;
-    const char *shelves_dir;
-    apr_hash_t *revprops;  /**< non-null; allocated in POOL */
-    svn_client_ctx_t *ctx;
-    apr_pool_t *pool;
-} svn_client__shelf_t;
-
-/** One version of a shelved change-set.
- *
- * @warning EXPERIMENTAL.
- */
-typedef struct svn_client__shelf_version_t
-{
-  /* Public fields (read-only for public use) */
-  svn_client__shelf_t *shelf;
-  apr_time_t mtime;  /**< time-stamp of this version */
-
-  /* Private fields */
-  const char *files_dir_abspath;  /**< abspath of the storage area */
-  int version_number;  /**< version number starting from 1 */
-} svn_client__shelf_version_t;
-
-/** Open an existing shelf or create a new shelf.
- *
- * Create a new shelf (containing no versions) if a shelf named @a name
- * is not found.
- *
- * The shelf should be closed after use by calling svn_client_shelf_close().
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_open_or_create(svn_client__shelf_t **shelf_p,
-                                const char *name,
-                                const char *local_abspath,
-                                svn_client_ctx_t *ctx,
-                                apr_pool_t *result_pool);
-
-/** Open an existing shelf named @a name, or error if it doesn't exist.
- *
- * The shelf should be closed after use by calling svn_client_shelf_close().
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_open_existing(svn_client__shelf_t **shelf_p,
-                               const char *name,
-                               const char *local_abspath,
-                               svn_client_ctx_t *ctx,
-                               apr_pool_t *result_pool);
-
-/** Close @a shelf.
- *
- * If @a shelf is NULL, do nothing; otherwise @a shelf must be an open shelf.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_close(svn_client__shelf_t *shelf,
-                       apr_pool_t *scratch_pool);
-
-/** Delete the shelf named @a name, or error if it doesn't exist.
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_delete(const char *name,
-                        const char *local_abspath,
-                        svn_boolean_t dry_run,
-                        svn_client_ctx_t *ctx,
-                        apr_pool_t *scratch_pool);
-
-/** Get an editor that, when driven, will store changes in @a shelf_version.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_mods_editor(const svn_delta_editor_t **editor_p,
-                              void **edit_baton_p,
-                              svn_client__shelf_version_t *shelf_version,
-                              svn_wc_notify_func2_t notify_func,
-                              void *notify_baton,
-                              svn_client_ctx_t *ctx,
-                              apr_pool_t *result_pool);
-
-/** Save the local modifications found by @a paths, @a depth,
- * @a changelists as a new version of @a shelf.
- *
- * If any paths are shelved, create a new shelf-version and return the new
- * shelf-version in @a *new_version_p, else set @a *new_version_p to null.
- * @a new_version_p may be null if that output is not wanted; a new shelf-
- * version is still saved and may be found through @a shelf.
- *
- * @a paths are relative to the CWD, or absolute.
- *
- * For each successfully shelved path: call @a shelved_func (if not null)
- * with @a shelved_baton.
- *
- * If any paths cannot be shelved: if @a not_shelved_func is given, call
- * it with @a not_shelved_baton for each such path, and still create a new
- * shelf-version if any paths are shelved.
- *
- * This function does not revert the changes from the WC; use
- * svn_client_shelf_unapply() for that.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_save_new_version3(svn_client__shelf_version_t **new_version_p,
-                                   svn_client__shelf_t *shelf,
-                                   const apr_array_header_t *paths,
-                                   svn_depth_t depth,
-                                   const apr_array_header_t *changelists,
-                                   svn_client_status_func_t shelved_func,
-                                   void *shelved_baton,
-                                   svn_client_status_func_t not_shelved_func,
-                                   void *not_shelved_baton,
-                                   apr_pool_t *scratch_pool);
-
-/** Delete all newer versions of @a shelf newer than @a shelf_version.
- *
- * If @a shelf_version is null, delete all versions of @a shelf. (The
- * shelf will still exist, with any log message and other revprops, but
- * with no versions in it.)
- *
- * Leave the shelf's log message and other revprops unchanged.
- *
- * Any #svn_client__shelf_version_t object that refers to a deleted version
- * will become invalid: attempting to use it will give undefined behaviour.
- * The given @a shelf_version will remain valid.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_delete_newer_versions(svn_client__shelf_t *shelf,
-                                       svn_client__shelf_version_t *shelf_version,
-                                       apr_pool_t *scratch_pool);
-
-/** Return in @a shelf_version an existing version of @a shelf, given its
- * @a version_number (starting from 1). Error if that version doesn't exist.
- *
- * There is no need to "close" it after use.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_version_open(svn_client__shelf_version_t **shelf_version_p,
-                              svn_client__shelf_t *shelf,
-                              int version_number,
-                              apr_pool_t *result_pool,
-                              apr_pool_t *scratch_pool);
-
-/** Return in @a shelf_version the newest version of @a shelf.
- *
- * Set @a shelf_version to null if no versions exist.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_get_newest_version(svn_client__shelf_version_t **shelf_version_p,
-                                    svn_client__shelf_t *shelf,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool);
-
-/** Return in @a versions_p an array of (#svn_client__shelf_version_t *)
- * containing all versions of @a shelf.
- *
- * The versions will be in chronological order, oldest to newest.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_get_all_versions(apr_array_header_t **versions_p,
-                                  svn_client__shelf_t *shelf,
-                                  apr_pool_t *result_pool,
-                                  apr_pool_t *scratch_pool);
-
-/** Apply @a shelf_version to the WC.
- *
- * If @a dry_run is true, try applying the shelf-version to the WC and
- * report the full set of notifications about successes and conflicts,
- * but leave the WC untouched.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_apply(svn_client__shelf_version_t *shelf_version,
-                       svn_boolean_t dry_run,
-                       apr_pool_t *scratch_pool);
-
-/** Test whether we can successfully apply the changes for @a file_relpath
- * in @a shelf_version to the WC.
- *
- * Set @a *conflict_p to true if the changes conflict with the WC state,
- * else to false.
- *
- * If @a file_relpath is not found in @a shelf_version, set @a *conflict_p
- * to FALSE.
- *
- * @a file_relpath is relative to the WC root.
- *
- * A conflict means the shelf cannot be applied successfully to the WC
- * because the change to be applied is not compatible with the current
- * working state of the WC file. Examples are a text conflict, or the
- * file does not exist or is a directory, or the shelf is trying to add
- * the file but it already exists, or trying to delete it but it does not
- * exist.
- *
- * Return an error only if something is broken, e.g. unable to read data
- * from the specified shelf-version.
- *
- * Leave the WC untouched.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_test_apply_file(svn_boolean_t *conflict_p,
-                                 svn_client__shelf_version_t *shelf_version,
-                                 const char *file_relpath,
-                                 apr_pool_t *scratch_pool);
-
-/** Reverse-apply @a shelf_version to the WC.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_unapply(svn_client__shelf_version_t *shelf_version,
-                         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,
-                         svn_wc_notify_func2_t notify_func,
-                         void *notify_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.
- *
- * The hash key is the path of the affected file, relative to the WC root.
- *
- * (Future possibility: When moves and copies are supported, the hash key
- * is the old path and value is the new path.)
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_paths_changed(apr_hash_t **affected_paths,
-                               svn_client__shelf_version_t *shelf_version,
-                               apr_pool_t *result_pool,
-                               apr_pool_t *scratch_pool);
-
-/** Set @a shelf's revprop @a prop_name to @a prop_val.
- *
- * This can be used to set or change the shelf's log message
- * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
- *
- * If @a prop_val is NULL, delete the property (if present).
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_revprop_set(svn_client__shelf_t *shelf,
-                             const char *prop_name,
-                             const svn_string_t *prop_val,
-                             apr_pool_t *scratch_pool);
-
-/** Set @a shelf's revprops to @a revprop_table.
- *
- * This deletes all previous revprops.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_revprop_set_all(svn_client__shelf_t *shelf,
-                                 apr_hash_t *revprop_table,
-                                 apr_pool_t *scratch_pool);
-
-/** Get @a shelf's revprop @a prop_name into @a *prop_val.
- *
- * If the property is not present, set @a *prop_val to NULL.
- *
- * This can be used to get the shelf's log message
- * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
- *
- * The lifetime of the result is limited to that of @a shelf and/or
- * of @a result_pool.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_revprop_get(svn_string_t **prop_val,
-                             svn_client__shelf_t *shelf,
-                             const char *prop_name,
-                             apr_pool_t *result_pool);
-
-/** Get @a shelf's revprops into @a props.
- *
- * The lifetime of the result is limited to that of @a shelf and/or
- * of @a result_pool.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_revprop_list(apr_hash_t **props,
-                              svn_client__shelf_t *shelf,
-                              apr_pool_t *result_pool);
-
-/** Set the log message in @a shelf to @a log_message.
- *
- * If @a log_message is null, delete the log message.
- *
- * Similar to svn_client_shelf_revprop_set(... SVN_PROP_REVISION_LOG ...).
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_set_log_message(svn_client__shelf_t *shelf,
-                                 const char *log_message,
-                                 apr_pool_t *scratch_pool);
-
-/** Get the log message in @a shelf into @a *log_message.
- *
- * Set @a *log_message to NULL if there is no log message.
- *
- * Similar to svn_client_shelf_revprop_get(... SVN_PROP_REVISION_LOG ...).
- *
- * The result is allocated in @a result_pool.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_get_log_message(char **log_message,
-                                 svn_client__shelf_t *shelf,
-                                 apr_pool_t *result_pool);
-
-/** Information about a shelf.
- *
- * @warning EXPERIMENTAL.
- */
-typedef struct svn_client__shelf_info_t
-{
-  apr_time_t mtime;  /**< mtime of the latest change */
-} svn_client__shelf_info_t;
-
-/** Set @a *shelf_infos to a hash, keyed by shelf name, of pointers to
- * @c svn_client_shelf_info_t structures, one for each shelf in the
- * given WC.
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_list(apr_hash_t **shelf_infos,
-                      const char *local_abspath,
-                      svn_client_ctx_t *ctx,
-                      apr_pool_t *result_pool,
-                      apr_pool_t *scratch_pool);
-
-/** Report the shelved status of all the shelved paths in @a shelf_version
- * via @a walk_func(@a walk_baton, ...).
- *
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client__shelf_version_status_walk(svn_client__shelf_version_t *shelf_version,
-                                     const char *wc_relpath,
-                                     svn_wc_status_func4_t walk_func,
-                                     void *walk_baton,
-                                     apr_pool_t *scratch_pool);
-/** @} */
-
 /** Changelist commands
  *
  * @defgroup svn_client_changelist_funcs Client Changelist Functions

Modified: subversion/branches/decouple-shelving-cli/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion/libsvn_client/diff.c?rev=1874632&r1=1874631&r2=1874632&view=diff
 ==============================================================================
--- subversion/branches/decouple-shelving-cli/subversion/libsvn_client/diff.c \
                (original)
+++ subversion/branches/decouple-shelving-cli/subversion/libsvn_client/diff.c Fri Feb \
28 21:15:40 2020 @@ -51,6 +51,7 @@
 #include "svn_subst.h"
 #include "client.h"
 
+#include "private/svn_client_shelf.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_diff_private.h"
 #include "private/svn_subr_private.h"

Modified: subversion/branches/decouple-shelving-cli/subversion/libsvn_client/shelf.c
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion/libsvn_client/shelf.c?rev=1874632&r1=1874631&r2=1874632&view=diff
 ==============================================================================
--- subversion/branches/decouple-shelving-cli/subversion/libsvn_client/shelf.c \
                (original)
+++ subversion/branches/decouple-shelving-cli/subversion/libsvn_client/shelf.c Fri \
Feb 28 21:15:40 2020 @@ -38,6 +38,7 @@
 #include "svn_props.h"
 
 #include "client.h"
+#include "private/svn_client_shelf.h"
 #include "private/svn_client_private.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_sorts_private.h"

Modified: subversion/branches/decouple-shelving-cli/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion/libsvn_client/status.c?rev=1874632&r1=1874631&r2=1874632&view=diff
 ==============================================================================
--- subversion/branches/decouple-shelving-cli/subversion/libsvn_client/status.c \
                (original)
+++ subversion/branches/decouple-shelving-cli/subversion/libsvn_client/status.c Fri \
Feb 28 21:15:40 2020 @@ -44,6 +44,7 @@
 #include "svn_error.h"
 #include "svn_hash.h"
 
+#include "private/svn_client_shelf.h"
 #include "private/svn_client_private.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_wc_private.h"

Modified: subversion/branches/decouple-shelving-cli/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/decouple-shelving-cli/subversion/svn/shelf-cmd.c?rev=1874632&r1=1874631&r2=1874632&view=diff
 ==============================================================================
--- subversion/branches/decouple-shelving-cli/subversion/svn/shelf-cmd.c (original)
+++ subversion/branches/decouple-shelving-cli/subversion/svn/shelf-cmd.c Fri Feb 28 \
21:15:40 2020 @@ -40,6 +40,7 @@
 #include "svn_private_config.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_client_private.h"
+#include "private/svn_client_shelf.h"
 
 
 /* Open the newest version of SHELF; error if no versions found. */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic