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

svn_client_create_context() question

From: void pointer <rcdailey_at_gmail.com>
Date: Fri, 12 Dec 2008 16:13:28 -0600

Hi,

I'm trying to learn how to use the SVN library so I can create my own GUI
wrapper for subversion. However, I'm running into some problems doing so. I
haven't found a lot of code examples/tutorials on how to use the library, so
I've been trying to use as much documentation as possible, but it's not
enough. Below is the code I'm trying to test on Windows XP:

----------------------------------------------------------------------------------------------------------
void test_svn()
{
    svn_error_t* err;

    svn_client_ctx_t* clientcontext;
    err = svn_client_create_context( &clientcontext, NULL );
    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,
                            NULL
                            );
}
----------------------------------------------------------------------------------------------------------

If you look at where I'm calling svn_client_create_context(), you'll notice
I'm passing in NULL for the apr_pool_t. I was hoping this parameter was
optional, but this function call is crashing so I can only assume that I
must create a pool. Can someone give me a code snippet showing how to do
this? Thanks.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=983554
Received on 2008-12-12 23:13:45 CET

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