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

SVN API: How to handle authentication and other callbacks?

From: void pointer <rcdailey_at_gmail.com>
Date: Fri, 12 Dec 2008 19:44:57 -0600

Hi,

I'm currently trying to learn the Subversion 1.5.4 library. I'm working on a
small prototype that is supposed to perform a basic checkout. However, I'm
unable to get the svn_client_checkout3() function to succeed. It's crashing
somewhere in the Subversion DLL, so I don't know exactly what the problem
could be. Just guessing, but I think this might be an issue with no
callbacks being registered. For example, there's callbacks to prompt when a
username or password is needed. There's also callbacks to handle
informational data (A sort of progress log) I'm sure. I'm not sure how to go
about setting up the callbacks I need to perform a checkout, much less which
callbacks are required in the first place. Can someone briefly run me
through what I need to do to complete my prototype? I've done as much as I
can up to this point independently. Below is my prototype code:

void test_svn()
{
    apr_initialize();

    apr_pool_t* pool;
    apr_pool_create( &pool, NULL );

    svn_error_t* err;

    svn_client_ctx_t* clientcontext;
    err = svn_client_create_context( &clientcontext, pool );
    assert( err == NULL );

    svn_opt_revision_t pegrevision;
    pegrevision.kind = svn_opt_revision_unspecified;

    svn_opt_revision_t revision;
    revision.kind = svn_opt_revision_head;

    svn_client_checkout3( NULL,
                            "http://haresvn.googlecode.com/svn/trunk/include
",
                            "C:\\test_checkout",
                            &pegrevision,
                            &revision,
                            svn_depth_infinity,
                            false,
                            false,
                            clientcontext,
                            pool
                            );
}

Thanks in advance for any assistance.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-13 02:45:54 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.