[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1352935 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/mergeinfo.c svn/main.c svn/mergeinfo-cmd.c

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 23 Jun 2012 00:44:20 -0400

On Jun 22, 2012 11:48 AM, <cmpilato <cmpilato_at_apache.org>@<cmpilato_at_apache.org>
apache.org <cmpilato_at_apache.org>> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Fri Jun 22
15:47:43 2012
> @@ -1622,20 +1622,21 @@ svn_client_mergeinfo_get_merged(apr_hash
>
>
> svn_error_t *
> -svn_client_mergeinfo_log(svn_boolean_t finding_merged,
> - const char *target_path_or_url,
> - const svn_opt_revision_t *target_peg_revision,
> - const char *source_path_or_url,
> - const svn_opt_revision_t *source_peg_revision,
> - svn_log_entry_receiver_t log_receiver,
> - void *log_receiver_baton,
> - svn_boolean_t discover_changed_paths,
> - svn_depth_t depth,
> - const apr_array_header_t *revprops,
> - svn_client_ctx_t *ctx,
> - apr_pool_t *scratch_pool)
> +svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
> + const char *target_path_or_url,
> + const svn_opt_revision_t *target_peg_revision,
> + const char *source_path_or_url,
> + const svn_opt_revision_t *source_peg_revision,
> + const svn_opt_revision_t
*source_start_revision,
> + const svn_opt_revision_t *source_end_revision,
> + svn_log_entry_receiver_t log_receiver,
> + void *log_receiver_baton,
> + svn_boolean_t discover_changed_paths,
> + svn_depth_t depth,
> + const apr_array_header_t *revprops,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *scratch_pool)
> {
> - apr_pool_t *sesspool = svn_pool_create(scratch_pool);
> const char *log_target = NULL;
> const char *repos_root;
> const char *target_repos_rel;
> @@ -1662,6 +1663,23 @@ svn_client_mergeinfo_log(svn_boolean_t f
> SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> _("Only depths 'infinity' and 'empty' are currently supported"));
>
> + /* Validate and sanitize the incoming source operative revision range.
*/
> + if (!((source_start_revision->kind == svn_opt_revision_unspecified) ||
> + (source_start_revision->kind == svn_opt_revision_number) ||
> + (source_start_revision->kind == svn_opt_revision_date) ||
> + (source_start_revision->kind == svn_opt_revision_head)))
> + return svn_error_create
> + (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
> + if (!((source_end_revision->kind == svn_opt_revision_unspecified) ||
> + (source_end_revision->kind == svn_opt_revision_number) ||
> + (source_end_revision->kind == svn_opt_revision_date) ||
> + (source_end_revision->kind == svn_opt_revision_head)))
> + return svn_error_create
> + (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);

Style: white space before paren, and it would be better to lead (not trail)
the lines with ||.

> ...

Cheers,
-g
Received on 2012-06-23 06:44:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.