You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Wascally Wabbit <wa...@earthling.net> on 2006/01/02 17:49:57 UTC
Possible bug in SVNAdmin.cpp/setLog API?
As per the FAQ on filing bugs/issues...I'm trying to use SVNAdmin.setLog
via the Java JNI libraries. There seems to be a no-win condition at lines
581-595 in SVNAdmin.cpp in trunk.
if (revision.revision()->kind != svn_opt_revision_number)
{
JNIUtil::handleSVNError(
svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Missing revision")));
return;
}
else if (revision.revision()->kind != svn_opt_revision_unspecified)
{
JNIUtil::handleSVNError(
svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Only one revision allowed")));
return;
}
If I pass the first if-clause that means kind == svn_opt_revision_number which
means the subsequent else-if clause will ALWAYS fail (kind is an enum).
Seems like a bug to me...
Thanks,
The Wabbit
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Possible bug in SVNAdmin.cpp/setLog API?
Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Jan 02, 2006 at 12:49:57PM -0500, Wascally Wabbit wrote:
> As per the FAQ on filing bugs/issues...I'm trying to use SVNAdmin.setLog
> via the Java JNI libraries. There seems to be a no-win condition at lines
> 581-595 in SVNAdmin.cpp in trunk.
>
> if (revision.revision()->kind != svn_opt_revision_number)
> {
> JNIUtil::handleSVNError(
> svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
> _("Missing revision")));
> return;
> }
> else if (revision.revision()->kind != svn_opt_revision_unspecified)
> {
> JNIUtil::handleSVNError(
> svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
> _("Only one revision allowed")));
> return;
> }
>
> If I pass the first if-clause that means kind == svn_opt_revision_number
> which
> means the subsequent else-if clause will ALWAYS fail (kind is an enum).
>
> Seems like a bug to me...
>
Yes, that looks like a bug to me too. Unfortunately, it's not immediately
obvious to me what the correct code should be. Patrick may know, since
he wrote the code originally, so cc'd.
Regards,
Malcolm
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org