You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/06/05 14:58:17 UTC
svn commit: r1746926 [1/3] - in /subversion/trunk/subversion:
include/private/svn_repos_private.h include/svn_repos.h
libsvn_ra_local/ra_plugin.c libsvn_repos/compat.c libsvn_repos/deprecated.c
libsvn_repos/log.c
Author: stefan2
Date: Sun Jun 5 14:58:17 2016
New Revision: 1746926
URL: http://svn.apache.org/viewvc?rev=1746926&view=rev
Log:
Deprecate svn_repos_get_logs4.
Small twist here: The ra_local log() implementation needs to expose an
repos_log4-esque API. So, we re-use all the shim code that adapts log5
onto log4 by exposing the latter through a new private API.
* subversion/include/svn_repos.h
(svn_repos_get_logs4): Depricate.
* subversion/include/private/svn_repos_private.h
(svn_repos__get_logs_compat): Declare new private API.
* subversion/libsvn_repos/log.c
(log_entry_receiver_baton_t,
path_change_kind_to_char,
log4_path_change_receiver,
log4_entry_receiver,
svn_repos_get_logs4): Move these log5/log4 shims from here ...
* subversion/libsvn_repos/compat.c
(): ... to this new file.
(svn_repos_get_logs4): Rename this ...
(svn_repos__get_logs_compat): ... to that.
* subversion/libsvn_repos/deprecated.c
(svn_repos_get_logs4): Add trivial implementation.
* subversion/libsvn_ra_local/ra_plugin.c
(svn_ra_local__get_log): Call the new private API instead of the
deprecated one.
Added:
subversion/trunk/subversion/libsvn_repos/compat.c
- copied, changed from r1746922, subversion/trunk/subversion/libsvn_repos/log.c
Modified:
subversion/trunk/subversion/include/private/svn_repos_private.h
subversion/trunk/subversion/include/svn_repos.h
subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
subversion/trunk/subversion/libsvn_repos/deprecated.c
subversion/trunk/subversion/libsvn_repos/log.c
Modified: subversion/trunk/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_repos_private.h?rev=1746926&r1=1746925&r2=1746926&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_repos_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_repos_private.h Sun Jun 5 14:58:17 2016
@@ -150,6 +150,29 @@ svn_repos__retrieve_config(svn_config_t
apr_pool_t *pool);
/**
+ * Non-deprecated alias for svn_repos_get_logs4.
+ *
+ * Since the mapping of log5 to ra_get_log is would basically duplicate the
+ * log5->log4 adapter, we provide this log4 wrapper that does not create a
+ * deprecation warning.
+ */
+svn_error_t *
+svn_repos__get_logs_compat(svn_repos_t *repos,
+ const apr_array_header_t *paths,
+ svn_revnum_t start,
+ svn_revnum_t end,
+ int limit,
+ svn_boolean_t discover_changed_paths,
+ svn_boolean_t strict_node_history,
+ svn_boolean_t include_merged_revisions,
+ const apr_array_header_t *revprops,
+ svn_repos_authz_func_t authz_read_func,
+ void *authz_read_baton,
+ svn_log_entry_receiver_t receiver,
+ void *receiver_baton,
+ apr_pool_t *pool);
+
+/**
* @defgroup svn_config_pool Configuration object pool API
* @{
*/
Modified: subversion/trunk/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_repos.h?rev=1746926&r1=1746925&r2=1746926&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_repos.h (original)
+++ subversion/trunk/subversion/include/svn_repos.h Sun Jun 5 14:58:17 2016
@@ -2064,64 +2064,22 @@ svn_repos_get_logs5(svn_repos_t *repos,
apr_pool_t *scratch_pool);
/**
- * Invoke @a receiver with @a receiver_baton on each log message from
- * @a start to @a end in @a repos's filesystem. @a start may be greater
- * or less than @a end; this just controls whether the log messages are
- * processed in descending or ascending revision number order.
- *
- * If @a start or @a end is #SVN_INVALID_REVNUM, it defaults to youngest.
- *
- * If @a paths is non-NULL and has one or more elements, then only show
- * revisions in which at least one of @a paths was changed (i.e., if
- * file, text or props changed; if dir, props or entries changed or any node
- * changed below it). Each path is a <tt>const char *</tt> representing
- * an absolute path in the repository. If @a paths is NULL or empty,
- * show all revisions regardless of what paths were changed in those
- * revisions.
- *
- * If @a limit is greater than zero then only invoke @a receiver on the first
- * @a limit logs.
+ * Similar to svn_repos_get_logs5 but using a #svn_log_entry_receiver_t
+ * @a receiver to receive revision properties and changed paths through a
+ * single callback and the @a discover_changed_paths flag to control it.
*
* If @a discover_changed_paths, then each call to @a receiver passes a
* hash mapping paths committed in that revision to information about them
* as the receiver's @a changed_paths argument.
* Otherwise, each call to @a receiver passes NULL for @a changed_paths.
*
- * If @a strict_node_history is set, copy history (if any exists) will
- * not be traversed while harvesting revision logs for each path.
- *
- * If @a include_merged_revisions is set, log information for revisions
- * which have been merged to @a paths will also be returned, unless these
- * revisions are already part of @a start to @a end in @a repos's
- * filesystem, as limited by @a paths. In the latter case those revisions
- * are skipped and @a receiver is not invoked.
- *
- * If @a revprops is NULL, retrieve all revision properties; else, retrieve
- * only the revision properties named by the (const char *) array elements
- * (i.e. retrieve none if the array is empty).
- *
- * If any invocation of @a receiver returns error, return that error
- * immediately and without wrapping it.
- *
- * If @a start or @a end is a non-existent revision, return the error
- * #SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
- *
- * If optional @a authz_read_func is non-NULL, then use this function
- * (along with optional @a authz_read_baton) to check the readability
- * of each changed-path in each revision about to be "pushed" at
- * @a receiver. If a revision has some changed-paths readable and
- * others unreadable, unreadable paths are omitted from the
- * changed_paths field and only svn:author and svn:date will be
- * available in the revprops field. If a revision has no
- * changed-paths readable at all, then all paths are omitted and no
- * revprops are available.
- *
- * See also the documentation for #svn_log_entry_receiver_t.
- *
- * Use @a pool for temporary allocations.
+ * @see svn_log_entry_receiver_t
*
* @since New in 1.5.
+ *
+ * @deprecated Provided for backward compatibility with the 1.9 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_get_logs4(svn_repos_t *repos,
const apr_array_header_t *paths,
Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1746926&r1=1746925&r2=1746926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Sun Jun 5 14:58:17 2016
@@ -1134,19 +1134,19 @@ svn_ra_local__get_log(svn_ra_session_t *
receiver = log_receiver_wrapper;
receiver_baton = &lb;
- return svn_repos_get_logs4(sess->repos,
- abs_paths,
- start,
- end,
- limit,
- discover_changed_paths,
- strict_node_history,
- include_merged_revisions,
- revprops,
- NULL, NULL,
- receiver,
- receiver_baton,
- pool);
+ return svn_repos__get_logs_compat(sess->repos,
+ abs_paths,
+ start,
+ end,
+ limit,
+ discover_changed_paths,
+ strict_node_history,
+ include_merged_revisions,
+ revprops,
+ NULL, NULL,
+ receiver,
+ receiver_baton,
+ pool);
}