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

Re: Using python to invoke svnadmin?

From: Jeremy Whitlock <jcscoobyrs_at_gmail.com>
Date: Wed, 13 Aug 2008 10:53:04 -0600

> I want to create a python script that performs an "svnadmin dump" for
> backup/archival purposes. I realize I could just use python to invoke a
> command, but I wanted to avoid that if possible. Is there a module somewhere
> that facilitates an interface into the svnadmin program? I basically need
> the python equivalent of "svnadmin dump /my/repo > my_backup". Thanks.

Well, it would be really simple to use the subprocess.call to
"wrapper" an svnadmin call, which would mirror invocation from the
command line basically but within Python. You could also use the
Subversion Python bindings to make direct Subversion API calls to
perform the dump. There is a very good example of doing this in the
Subversion Python bindings tests:

http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/python/tests/repository.py?view=log

I hope this helps.

Take care,

Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-13 18:53:32 CEST

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.