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

No error dialog if lock command failed

From: Andriy Kulchytskyy <whoops_at_ukrtop.com>
Date: 2005-08-31 10:40:55 CEST

Hello,

I am using subclipse (JavaHL interface) and there is no error
dialog (and no exception thrown) if lock command failed.

Probably bug is in JavaHL library in file SVNClient.cpp
http://svn.collab.net/repos/svn/trunk/subversion/bindings/java/javahl/native/SVNClient.cpp

Method: SVNClient::lock (line 3072)

void SVNClient::lock(Targets &targets, const char *comment,
                        bool force)
{
    Pool requestPool;
    const apr_array_header_t *targetsApr = targets.array(requestPool);
    svn_error_t *Err = targets.error_occured(); // one *Err variable
    if(Err != NULL)
    {
        JNIUtil::handleSVNError(Err);
        return;
    }
    apr_pool_t * apr_pool = requestPool.pool ();
    svn_client_ctx_t *ctx = getContext(NULL);
    svn_error_t *err = svn_client_lock(targetsApr, // !!! another *err variable
        comment, force, ctx, apr_pool);

    if (Err != NULL) // !!! but checked the first one
    {
        JNIUtil::handleSVNError(err);
    }
}

The correct code should be:

void SVNClient::lock(Targets &targets, const char *comment,
                        bool force)
{
    Pool requestPool;
    const apr_array_header_t *targetsApr = targets.array(requestPool);
    svn_error_t *Err = targets.error_occured();
    if(Err != NULL)
    {
        JNIUtil::handleSVNError(Err);
        return;
    }
    apr_pool_t * apr_pool = requestPool.pool ();
    svn_client_ctx_t *ctx = getContext(NULL);
    Err = svn_client_lock(targetsApr,
        comment, force, ctx, apr_pool);

    if (Err != NULL)
    {
        JNIUtil::handleSVNError(err);
    }
}

-- 
Best regards,
 Andriy                          mailto:whoops@ukrtop.com


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

Received on Wed Aug 31 09:42:48 2005

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

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