nkowalsky@gmx.de writes:
> MSVC .NET 2003
> Subversion 1.0.3/1.0.4
>
> Hi,
>
> I have massive problems using the Subversion API.
Since you don't list the exact documents you've read, it's hard for
anyone to know how to help you further.
I'd suggest the HACKING file (which explains the pool concept in
detail), but that seems so obvious that I assume you've been there
already.
The "main doc" to which you refer is a book intended for users, not
developers. It is not an API doc, any more than a car's user manual
tells one how to replace the transmission.
If you just want to access a local repository without user management,
why not use the file:// access method already built into svn?
-Karl
> There are only fragmentlike docs for the API I've found:
> I've studied the main doc by Ben Collins-Sussman, Brian W. Fitzpatrick, C.
> Michael Pilato. But the main point is focused on common users.
> Then I've read Garrett Rooney's Using the SVN API.
> The hint to read the source code of the SVN client source codes is
> well-meant. The sources are too complicated and disturbing.
> The docs lack coherence and are totally confusing, e.g. pool concept,
> authorizing.
> I couldn't found any coherent examples for the API beginner.
>
> I want only use a simple repository on a drive without password protection
> and user administration.
> I gleaned from the various sources a fragmented basic understanding and
> wrote following program:
> creating a repository, checkout and add a file (test.txt).
> While adding the file the API crashes the program.
>
> code snippet:
>
>
> svn_error_t* error;
>
> apr_pool_t* createPool = svn_pool_create(NULL);
> svn_repos_t* repos;
> error = svn_repos_create(&repos, "c:/temp/repos", NULL, NULL, NULL, NULL,
> createPool);
>
> apr_pool_t* ctxPool = svn_pool_create(NULL);
> svn_client_ctx_t* ctx;
> error = svn_client_create_context(&ctx, ctxPool);
>
> apr_pool_t* providerArrayPool = svn_pool_create(NULL);
> apr_array_header_t *providers = apr_array_make (providerArrayPool, 1, sizeof
> (svn_auth_provider_object_t *));
>
> apr_pool_t* providerPool = svn_pool_create(NULL);
> svn_auth_provider_object_t* provider;
> svn_client_get_simple_provider(&provider, providerPool);
> *(svn_auth_provider_object_t **)apr_array_push (providers) = provider;
>
> apr_pool_t* batonPool = svn_pool_create(NULL);
> svn_auth_baton_t *auth_baton;
> svn_auth_open (&auth_baton, providers, batonPool);
> ctx->auth_baton = auth_baton;
>
> apr_pool_t* checkoutPool = svn_pool_create(NULL);
> svn_revnum_t rev;
> svn_opt_revision_t revision;
> revision.kind = svn_opt_revision_head;
> error = svn_client_checkout(&rev, "file:///c:/temp/repos",
> "c:/temp/workcopy", &revision, true, ctx, checkoutPool);
>
> apr_pool_t* addPool = svn_pool_create(NULL);
> error = svn_client_add("c:/temp/workcopy/test.txt", false, ctx, addPool);
>
>
> Thank you.
>
> Best regards
> N. Kowalsky
>
> --
> "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
> Jetzt aktivieren unter http://www.gmx.net/info
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 3 23:14:53 2004