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

svn_client_status3 causing access violation; what am I doing wrong?

From: Rick Yorgason <rick_at_ldagames.com>
Date: Fri, 20 Mar 2009 06:07:41 -0400

Hey everbody,

I'm trying to do something pretty simple with libsvn; just pass in the
name of a file which is under source control, and retrieve the status.
Unfortunately, my call to svn_client_status3 is just causing an access
violation with no useful error status. Any idea what I'm doing wrong?

Thanks; source follows.

-Rick-

#include <iostream>
#include <exception>

#include <svn_pools.h>
#include <svn_client.h>

using namespace std;

void statusFunc(void *baton, const char *path, svn_wc_status2_t *status)
{
        cout << "Test\n";
}

int main()
{
        apr_allocator_t *allocator;
        apr_pool_t* pPool;
        if(apr_allocator_create (&allocator))
                throw exception("Could not create top-level allocator.");

        apr_allocator_max_free_set (allocator, SVN_ALLOCATOR_RECOMMENDED_MAX_FREE);

        pPool = svn_pool_create_ex (NULL, allocator);
        if(!pPool)
                throw exception("Could not create memory pool.");

        svn_client_ctx_t* ctx;
        svn_error_t* pError = svn_client_create_context(&ctx, pPool);
        if(pError)
                throw exception(pError->message);

        apr_pool_t* pSubpool = svn_pool_create(pPool);
        if(!pSubpool)
                throw exception("Could not create subpool.");

        svn_client_status3(NULL,
"D:/Projects/hegemony.trunk/Release/Resources/Sounds/Ballista/Ballista_Creaks_Big_01.ogg",
NULL, &statusFunc, NULL, svn_depth_infinity, true, false, true, false,
NULL, ctx, pSubpool);

        return 0;
}

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1363389

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-20 17:26:26 CET

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.