I did some homework and while I can answer all below questions about exporting SVN repo on Windows (using VisualSVN server), I'm completely lost on Linux as I'm total newbie there.
I want to use SVN's export feature on Linux, to have website updated each time I commit a repository. But there are some problems with that.
I've read out these three: How to use "svn export" command to get a single file from the repository? http://www.duchnik.com/tutorials/2011/07/02/svn-command-reference http://www.picksourcecode.com/ps/ct/161055.php
and figured out following command to be used inside post-commit hook:
svn export --force svn://localhost/repository_name /share/Web/projects/website
Questions:
Anyone has any idea, why it does not work? Changes are commited to repository, but operations ends up with "post-commit hook failed (exit code 255) with no output". And post-commit hook seems to be not fired, as destination website is not updated. I've checked (or even doublechecked) that command itself works like a charm (when called from command-line). It only fails inside post-commit hook. I've tried to add "exit 0" at the end of this file. And of course it is executable. No luck. Still, after many attempts, the same error code.
Why this operation works, even though I haven't provided username and password as params? The "passwd" file inside repository is properly set and any operation from external client requires providing username and password or else fails. Some bug in SVN?
Is there any way to limit files exported to destination to only changed / added / deleted, not to export whole repository after each commit?
Is there anyway to do exactly the same (export), but to an external server, over FTP, instead of my QNAP's local path?
For points three and four I tried to use svn2web tool form SourceForge, but this is rather bad idea and it is not working. It uses pre-commit hook instead of post-commit, which means that any error in it will block developers from commiting their work (in my case -- post-commit -- changes are commited, only not propagated to destination). Their pre-commit hook fails on my server (the same error message as in point one above) and their approach (solution) of adding "svn2web" property to folder properties maybe works for pure Linux Subversion clients but seems to be failling completely when using TortoiseSVN on Windows as SVN client.
I'm wondering, if solution for problem no 1 (and 2-3 and maybe 4) wouldn't be to setup a Local Working Copy inside /share/Web/projects/website and use CRON for perodic updates of this repository? This would always "export" only actual changes and would probably fail without poper login and password. But this seems to be reinventing wheel or forcing to open already open doors.
Thank you in advance for any help.