On Apr 4, 2008, at 11:33, <Dominique.Holzwarth ch.delarue.com>
<Dominique.Holzwarth ch.delarue.com> wrote:
> Hi everyone
>
> I intend to use pysvn together with the Apache server
and
> mod_python module. Basicly I'm writting a web
application that
> needs to access svn. My problem now is, that if the
script
> "myscript.py" is called due to a browser
request I do something
> like that:
>
> # create client object and do a checkout
> client = pysvn.Client(os.path.join(common.usersDir,
req.user,
> common.userDirectories[3]))
You do know that this is the config folder for SVN not the
repo?
~/.subversion by default on unix. %APPDATA%Subversion on
windows I
think.
> client.checkout(common.repositoryName, os.path.join
> (common.usersDir, req.user,
common.userDirectories[1]))
>
I assume you also setup the username and password etc that
you need
to get through authenication.
> Then, as an answer to another browser request, the
script "xy.py"
> is called and inside it I'd like to do something like
this:
>
> # update the working directory before start working on
it
> client.update(...)
>
> My problem now is tho, that the client object is not
know anymore
> of course... And if I do a
> client = pysvn.Client(os.path.join(common.usersDir,
req.user,
> common.userDirectories[3]))
>
> I think that object doesn't know with which repository
it should
> 'talk'...
True the object never knows, thats why you tell it in each
and every
call with URL or PATH arguments.
All you need to do is pass the PATH to Client().update() and
everything will work.
>
> So I thought about pickling the client object (and
unpickle it in
> every script when I need it) but I got an error:
>
>
I have no support for pickling a Client() object, its not
needed.
Barry
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe pysvn.tigris.org
For additional commands, e-mail: users-help pysvn.tigris.org
|