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

Re: JavaHL - setConfigDirectory() method working?

From: Konstantin Kolinko <knst.kolinko_at_gmail.com>
Date: Tue, 17 May 2011 02:11:34 +0400

2011/5/16 Mark Phippard <markphip_at_gmail.com>:
> Looking at the code in trunk, it seems like this is coded properly and
> should be working.  I am seeing unexpected behavior.  Maybe I just do
> not understand how it works?
> In Subclipse we expose UI to tell us the config directory location.
> Most people just leave this as the default, which is same as command
> line.  I wanted to test the password callbacks, so I pointed it at a
> new folder so that I would get prompted again to cache credentials and
> accept certs etc.  I have verified that the Subclipse code is properly
> calling the method to set this folder, however I do not get any
> prompts.
>  Only if I rename the default config directory do I get
> prompts.  And I also see SVN recreate the default.
> This leads me to believe this code is broken in trunk, but from what I
> can see it looks right.
> It looks like it calls a method on ClientContext:
> ClientContext::setConfigDirectory(const char *configDir)
> {
>    // A change to the config directory may necessitate creation of
>    // the config templates.
>    SVN::Pool requestPool;
>    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool.pool()), );
>    m_configDir = (configDir == NULL ? "" : configDir);
> }
> Any ideas?

Just guessing:

1. When you call the method, does it create
"README.txt", "config", "servers" files in the specified directory?

If so, then svn_config_ensure(..) call works correctly.

2. The m_configDir field is later used by
ClientContext::getContext(CommitMessage *message)

Are you calling getContext() after the call to setConfigDirectory() ?

3. Command line client works:
svn --config-dir conf co
creates the configuration directory, asks whether I trust the
certificate and remember the choice.

This is with svn 1.7.0-dev from TortoiseSVN nightly. It is built from
r1103260 of trunk.

Best regards,
Konstantin Kolinko
Received on 2011-05-17 00:12:03 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.