List Info

Thread: callback_




callback_
user name
2007-06-18 17:58:46
All,
I am using pool of pysvn clients for a web app (as creating & deleting them appears to cause memory leaks) with an apache-server http:// repo, created using the code below. Unfortunatly, get_login appears to only be called the first time the client is used to access a resource in the repository and the username/password data appears to be cached. For this app the username/password could change for every different access to the same repository.

Can I disable caching of this data and ensure that the get_login callback is called once for each time a login is needed?

Thanks,

Stephen English

---------------------

def GetClient():
   ; """
    Get a pysvn client.
    inputs: none
 ;   returns: A pysvn client object setup for logging into the server
    """
    def get_login(realm, username, may_save):
        user = cherrypy.request.headers[";X-Forwarded-User";]
       ; log.debug("setting get_login with username %s" % user)
        return True, user, "", False

    a = pysvn.Client()
   ; a.callback_get_login = get_login
  ;  a.set_store_passwords(False)
    a.set_auth_cache(False)
    return a

Re: callback_
user name
2007-06-23 03:14:53
On Jun 18, 2007, at 23:58, Stephen English wrote:

> All,
> I am using pool of pysvn clients for a web app (as
creating &  
> deleting them appears to cause memory leaks) with an
apache-server  
> http:// repo, created using the code below.
Unfortunatly, get_login  
> appears to only be called the first time the client is
used to  
> access a resource in the repository and the
username/password data  
> appears to be cached. For this app the
username/password could  
> change for every different access to the same
repository.
>

The memory leak is fixed in the /trunk version of pysvn.
Are you building your own pysvn or using binary kits?
If building your own then get the pysvn trunk and use that.

Now that SVN 1.4.4 is released I plan to release pysvn and
workbench
against it.


> Can I disable caching of this data and ensure that the
get_login  
> callback is called once for each time a login is
needed?
>

You have told SVN that it is not to save the credentials on
disk.

But SVN will cache them in memory I expect so you only get
one call  
to get_login.

You I the only way to do what you want to do is to create a
new Client 
().

Barry

------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribepysvn.tigris.org
For additional commands, e-mail: users-helppysvn.tigris.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )