You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kouhei Sutou <ko...@cozmixng.org> on 2005/07/21 15:19:33 UTC

[PATCH] add svn_config_clear_auth_data

Hi,

I want to clear auth data cache for cleaning up test
environment. Can I add a new API to clear auth data cache?

[[[
Add auth data cache cleaning up API.

* subversion/include/svn_config.h
 (svn_config_clear_auth_data),
  subversion/libsvn_subr/config_auth.c
 (svn_config_clear_auth_data): New function.

* subversion/tests/libsvn_subr/config-test.c (test3): New
  function. This is a test for the following functions:
  - svn_config_read_auth_data
  - svn_config_write_auth_data
  - svn_config_clear_auth_data
]]]


Thanks,
--
kou

Re: [PATCH] add svn_config_clear_auth_data

Posted by Max Bowsher <ma...@ukf.net>.
Kouhei Sutou wrote:
> Hi,
>
> In <06...@chimaera>
>  "Re: [PATCH] add svn_config_clear_auth_data" on Fri, 22 Jul 2005 15:00:14
>  +0100, "Max Bowsher" <ma...@ukf.net> wrote:
>
>> A simple "clear all" API doesn't seem particularly useful.
>>
>> For the purposes of testing, I suggest just removing the auth cache 
>> files.
>
> I have wanted to do that in first. But an auth cache file
> name generation API is not public. (Yes, I can remove auth
> cache directory.) So I request clear an auth cache API.

Oops, sorry, I misunderstood what the new API was supposed to do. "clear" 
sounds like it might mean "clear all". I think the name 
"svn_config_delete_auth_data" better explains the functionality.

However, you shouldn't need an API like this for cleaning up testing 
environments, because testing environments should be using a private config 
area which can be totally removed anyway.

So, in conclusion, this API makes sense conceptually, but your reason for 
wanting it does not.
I've no problem with adding the API if there is a known practical use for 
it, but I don't know of one at present.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] add svn_config_clear_auth_data

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <06...@chimaera>
  "Re: [PATCH] add svn_config_clear_auth_data" on Fri, 22 Jul 2005 15:00:14 +0100,
  "Max Bowsher" <ma...@ukf.net> wrote:

> A simple "clear all" API doesn't seem particularly useful.
> 
> For the purposes of testing, I suggest just removing the auth cache files.

I have wanted to do that in first. But an auth cache file
name generation API is not public. (Yes, I can remove auth
cache directory.) So I request clear an auth cache API.

> APIs to enumerate and selectively delete auth cache entries might be 
> interesting, though...

Selectively deleting can be done with current APIs.

  apr_hash_t *hash;
  svn_config_read_auth_data (&hash, cred_kind, realmstring, config_dir, pool);
  apr_hash_set (hash, "KEY", APR_HASH_KEY_STRING, NULL);
  svn_config_write_auth_data (hash, cred_kind, realmstring, config_dir, pool);



By the way, what about the test script of
svn_config_read_auth_data() and
svn_config_write_auth_data()?  The test script is included
in the attached patch of the previous mail.


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] add svn_config_clear_auth_data

Posted by Max Bowsher <ma...@ukf.net>.
Kouhei Sutou wrote:
> Hi,
>
> I want to clear auth data cache for cleaning up test
> environment. Can I add a new API to clear auth data cache?

A simple "clear all" API doesn't seem particularly useful.

For the purposes of testing, I suggest just removing the auth cache files.


APIs to enumerate and selectively delete auth cache entries might be 
interesting, though...
Such things probably should be designed in conjunction with the TSVN people, 
who are probably one of the most likely users of such APIs.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org