c++ - libsvn - svn_client_checkout() -


I'm just trying to do a simple checkout. I think the code will work, and I can compile it. #include "stdafx.h" #include "svn_pools.h" #include "svn_client.h" int _tmain (int argc, _TCHAR * argv []) {svn_error_t * err; Apr_pool_t * pool; Svn_client_ctx_t * ctx; Apr_initialize (); Pool = svn_pool_create (NULL); If (err = svn_client_create_context (and ctx, pool)) {svn_pool_destroy (pool); Return 0; } Err = svn_client_checkout (NULL, "http://tortoisesvn.googlecode.com/svn/trunk/src/ResText", "C: \\ sve", tap, true, CTX, pool); Svn_pool_destroy (pool); Return 0; }

But there is a mistake in svn_client_checkout () function on the run. 0x00000000 Use violation during reading I think I forgot to start one of my variables but what else?

It looks like the fourth parameter, const svn_opt_revision_t * peg_revision , not optional And therefore no NULL will not do this.

Start it eg, such as this should work:

  svn_opt_revision_t rev = {svn_opt_revision_head, 0}; Svn_client_checkout (..., "c: \\ sve", & amp; rev, true, ...);   

Look for details of how you can set and use.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -