You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2008/03/31 20:07:02 UTC

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

On Wed, Mar 19, 2008 at 5:50 AM,  <bh...@tigris.org> wrote:
> Author: bhuvan
>  Date: Wed Mar 19 05:50:54 2008
>  New Revision: 29948
>
>  Log:
>  If working copy dependent revision kind is used for 'svn log url -rXXX'
>  command, display an error message. Add svn_opt_revision_working to list
>  of revision kinds we should check.
>
>  * subversion/include/svn_client.h
>   (SVN_CLIENT_IS_WC_DEPENDENT_REVKIND): New macro to check if revision
>   kind is dependent on working copy. If yes, return TRUE; otherwise,
>   return FALSE.

Shouldn't this go in svn_opt?

Also, revkind isn't a term we use; the variable is called
svn_opt_revision_kind.  Perhaps SVN_OPT_REVISION_KIND_DEPENDS_ON_WC?

>  * subversion/libsvn_client/log.c
>   (svn_client_log4): Use the new macro. Even if start/end revision kind
>   is dependent on working copy, display an error message.
>
>  Approved by: kameshj
>
>  Modified:
>    trunk/subversion/include/svn_client.h
>    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=29948&r1=29947&r2=29948
>  ==============================================================================
>  --- trunk/subversion/include/svn_client.h       Tue Mar 18 21:41:21 2008        (r29947)
>  +++ trunk/subversion/include/svn_client.h       Wed Mar 19 05:50:54 2008        (r29948)
>  @@ -4303,6 +4303,16 @@ 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.
>  + */

Since macros don't have types for their arguments, the docstring
should say the type of the argument (although this probably is
irrelevant if you change the name to SVN_OPT_REVISION_KIND_foo).
[
>  +#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)

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Karl Fogel <kf...@red-bean.com>.
"David Glasser" <gl...@davidglasser.net> writes:
> Shouldn't this go in svn_opt?
>
> Also, revkind isn't a term we use; the variable is called
> svn_opt_revision_kind.  Perhaps SVN_OPT_REVISION_KIND_DEPENDS_ON_WC?

Oy.  The prefix "SVN_OPT_REVISION_KIND_DEPENDS_ON_" is already 32 chars
long.  Maybe "SVN_OPT_REVISION_KIND_NEEDS_WC" ?

-Karl


>>  * subversion/libsvn_client/log.c
>>   (svn_client_log4): Use the new macro. Even if start/end revision kind
>>   is dependent on working copy, display an error message.
>>
>>  Approved by: kameshj
>>
>>  Modified:
>>    trunk/subversion/include/svn_client.h
>>    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=29948&r1=29947&r2=29948
>>  ==============================================================================
>>  --- trunk/subversion/include/svn_client.h       Tue Mar 18 21:41:21 2008        (r29947)
>>  +++ trunk/subversion/include/svn_client.h       Wed Mar 19 05:50:54 2008        (r29948)
>>  @@ -4303,6 +4303,16 @@ 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.
>>  + */
>
> Since macros don't have types for their arguments, the docstring
> should say the type of the argument (although this probably is
> irrelevant if you change the name to SVN_OPT_REVISION_KIND_foo).
> [
>>  +#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)
>
> --dave
>
>
> -- 
> David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org