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

Re: svn commit: r29961 - in trunk/subversion: include libsvn_client

From: David Glasser <glasser_at_davidglasser.net>
Date: Mon, 31 Mar 2008 13:58:43 -0700

On Wed, Mar 19, 2008 at 10:48 AM, <bhuvan_at_tigris.org> wrote:
> Author: bhuvan
> Date: Wed Mar 19 10:48:51 2008
> New Revision: 29961
>
> Log:
> This is a follow-up for r29948. Rename the macro which checks if
> revision kind is dependent on a WC. Use the new macro wherever it is
> applicable.
>
> * subversion/include/svn_client.h
> (SVN_CLIENT_IS_WC_DEPENDENT_REVKIND): Move this macro ...
> * subversion/libsvn_client/client.h
> (SVN_CLIENT__REVKIND_NEEDS_WC) ... to here and rename it.

I see I commented on r29948 before reading all my mail.

I still think it should be in svn_opt (so that it can be adjusted for
future revision kinds), and should have a name without the new term
"revkind".

--dave

> * subversion/libsvn_client/copy.c
> (setup_copy): Use the macro.
> * subversion/libsvn_client/log.c
> (svn_client_log4): Use the new macro.
>
> Suggested by: kfogel
> Approved by: kfogel
>
> Modified:
> trunk/subversion/include/svn_client.h
> trunk/subversion/libsvn_client/client.h
> trunk/subversion/libsvn_client/copy.c
> trunk/subversion/libsvn_client/log.c
>
> Modified: trunk/subversion/include/svn_client.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_client.h?pathrev=29961&r1=29960&r2=29961
> ==============================================================================
> --- trunk/subversion/include/svn_client.h Wed Mar 19 10:29:38 2008 (r29960)
> +++ trunk/subversion/include/svn_client.h Wed Mar 19 10:48:51 2008 (r29961)
> @@ -4303,16 +4303,6 @@ svn_client_open_ra_session(svn_ra_sessio
>
> /** @} */
>
> -/** Return TRUE iff revision kind is dependent on the working copy.
> - * Otherwise, return FALSE.
> - *
> - * @since New in 1.6.
> - */
> -#define SVN_CLIENT_IS_WC_DEPENDENT_REVKIND(kind) \
> - ((kind == svn_opt_revision_base || kind == svn_opt_revision_previous || \
> - kind == svn_opt_revision_working || kind == svn_opt_revision_committed) \
> - ? TRUE : FALSE)
> -
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
>
> Modified: trunk/subversion/libsvn_client/client.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/client.h?pathrev=29961&r1=29960&r2=29961
> ==============================================================================
> --- trunk/subversion/libsvn_client/client.h Wed Mar 19 10:29:38 2008 (r29960)
> +++ trunk/subversion/libsvn_client/client.h Wed Mar 19 10:48:51 2008 (r29961)
> @@ -1059,6 +1059,17 @@ svn_error_t *svn_client__get_revprop_tab
> svn_client_ctx_t *ctx,
> apr_pool_t *pool);
>
> +
> +/** Return TRUE iff revision kind is dependent on the working copy.
> + * Otherwise, return FALSE.
> + */
> +#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
> + (((kind) == svn_opt_revision_base || \
> + (kind) == svn_opt_revision_previous || \
> + (kind) == svn_opt_revision_working || \
> + (kind) == svn_opt_revision_committed) \
> + ? TRUE : FALSE)
> +
>
> #ifdef __cplusplus
> }
>
> Modified: trunk/subversion/libsvn_client/copy.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/copy.c?pathrev=29961&r1=29960&r2=29961
> ==============================================================================
> --- trunk/subversion/libsvn_client/copy.c Wed Mar 19 10:29:38 2008 (r29960)
> +++ trunk/subversion/libsvn_client/copy.c Wed Mar 19 10:48:51 2008 (r29961)
> @@ -1711,9 +1711,7 @@ setup_copy(svn_commit_info_t **commit_in
> ((svn_client_copy_source_t **) (sources->elts))[i];
>
> if (svn_path_is_url(source->path)
> - && (source->peg_revision->kind == svn_opt_revision_base
> - || source->peg_revision->kind == svn_opt_revision_committed
> - || source->peg_revision->kind == svn_opt_revision_previous))
> + && (SVN_CLIENT__REVKIND_NEEDS_WC(source->peg_revision->kind)))
> return svn_error_create
> (SVN_ERR_CLIENT_BAD_REVISION, NULL,
> _("Revision type requires a working copy path, not a URL"));
>
> Modified: trunk/subversion/libsvn_client/log.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/log.c?pathrev=29961&r1=29960&r2=29961
> ==============================================================================
> --- trunk/subversion/libsvn_client/log.c Wed Mar 19 10:29:38 2008 (r29960)
> +++ trunk/subversion/libsvn_client/log.c Wed Mar 19 10:48:51 2008 (r29961)
> @@ -326,9 +326,9 @@ svn_client_log4(const apr_array_header_t
> /* Use the passed URL, if there is one. */
> if (svn_path_is_url(url_or_path))
> {
> - if (SVN_CLIENT_IS_WC_DEPENDENT_REVKIND(peg_revision->kind) ||
> - SVN_CLIENT_IS_WC_DEPENDENT_REVKIND(start->kind) ||
> - SVN_CLIENT_IS_WC_DEPENDENT_REVKIND(end->kind))
> + if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind) ||
> + SVN_CLIENT__REVKIND_NEEDS_WC(start->kind) ||
> + SVN_CLIENT__REVKIND_NEEDS_WC(end->kind))
>
> return svn_error_create
> (SVN_ERR_CLIENT_BAD_REVISION, NULL,
> @@ -433,7 +433,7 @@ svn_client_log4(const apr_array_header_t
> /* If this is a revision type that requires access to the working copy,
> * we use our initial target path to figure out where to root the RA
> * session, otherwise we use our URL. */
> - if (SVN_CLIENT_IS_WC_DEPENDENT_REVKIND(peg_revision->kind))
> + if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
> SVN_ERR(svn_path_condense_targets(&ra_target, NULL, targets, TRUE, pool));
> else
> ra_target = url_or_path;
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-31 22:58:59 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.