tags:

views:

849

answers:

3

Hello,

I started using subversion for one of my projects and it would be absolutely amazing if I could just export the latest version from the repository on my production server by for example running a php or perl script.

The production site is hosted with a shared hosting provider who doesn't allow shell access or for example the php exec command. (I don't know much about perl; I only know that my hoster allows perl and custom cgi scripts).

Is it possible to perform a SVN export in this environment?

A: 

SVN supports access over WebDAV (i.e. HTTPS). This means for simple read access you don't actually need an SVN client to access an SVN repository. You can even use a web browser, or in your case any PHP function that accepts a URL as its argument. SVN has to be set up on the server side to work with apache, for more info check out the svn red book

sk
+1  A: 

As far as I know there is no SVN client fully written in PHP or Perl. SO without exec you're out of luck.

Workarounds:

  • Depending on your own OS and what methods you have to access your web space you might be able to mount the web space in your local file system and just use your system's SVN client for checking out/updating.
  • Again depending on your access methods (I'm guessing ftp or sftp) you might update a local checkout and sync any changes up onto the web space.
_Lasar
A: 

Have a look on this:

http://www.randomsequence.com/articles/svn-backup-script/

Of course, you still need exec for that, but as said it won't be difficult to code something in PHP that runs an http call to your svn server.

Or else, something like:

palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/

Cheers!

arieltools