Client Context not working for Commits
From: Bottomley, Peter <PBottomley_at_t-tales.com>
Date: Mon, 13 Oct 2008 12:25:50 +0100
Hi,
Whilst writing my own SVN Client application, I have been implementing
After debugging into the commit method it appeared that the issue was
I am using the same code to generate a basic svn_client_ctx_t object for
This is the context generation code I am using at the mo, which works
CODE:
////////////////////////////////////////////////////////////////////////
svn_error_t * SVNManager::SetUpClientContext (svn_client_ctx_t **ctx,
{
/* Allocate the context, using apr_pcalloc to ensure it is zeroed
*ctx = (svn_client_ctx_t *)apr_pcalloc (pool, sizeof (*ctx));
/* read in the client's config options. */
SVN_ERR (svn_config_get_config(&(*ctx)->config, NULL, pool));
// Set up the Authentication Baton:
{
svn_auth_baton_t *auth_baton;
// Add the providers.
apr_array_header_t *providers = apr_array_make (pool, 10,
svn_auth_provider_object_t *provider;
svn_client_get_windows_simple_provider (&provider, pool);
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
svn_client_get_simple_provider (&provider, pool);
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
svn_client_get_username_provider (&provider, pool);
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
/* The server-cert, client-cert, and client-cert-password
svn_client_get_ssl_server_trust_file_provider (&provider,
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
svn_client_get_ssl_client_cert_file_provider (&provider,
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
svn_client_get_ssl_client_cert_pw_file_provider (&provider,
APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) =
svn_auth_open (&auth_baton, providers, pool);
// Set the username and password from the stored values.
svn_auth_set_parameter(auth_baton,
g_username.c_str());
svn_auth_set_parameter(auth_baton,
g_password.c_str());
// Fill in the context data.
(*ctx)->auth_baton = auth_baton;
(*ctx)->cancel_func = NULL;
(*ctx)->cancel_baton = NULL;
(*ctx)->conflict_func = NULL;
(*ctx)->conflict_baton = NULL;
// (*ctx)->log_msg_func = NULL;
(*ctx)->log_msg_baton = NULL;
(*ctx)->log_msg_func2 = NULL;
(*ctx)->log_msg_baton2 = NULL;
(*ctx)->log_msg_func3 = NULL;
(*ctx)->log_msg_baton3 = NULL;
(*ctx)->notify_func = NULL;
(*ctx)->notify_baton = NULL;
(*ctx)->notify_func2 = NULL;
(*ctx)->notify_baton2 = NULL;
(*ctx)->progress_func = NULL;
(*ctx)->progress_baton = NULL;
}
return NULL;
}
////////////////////////////////////////////////////////////////////////
As you can see, the username and password are just being set as defaults
There are no callback functions currently, however I have written
Is there something I am missing that is required for commits?
Please help! Thanks.
Pete.
|
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.