With SVN I am currently exporting the contents of the repository to a test server manually using the following command on the test server (after logging in via SSH/Shell):
svn export http://svn.domain.co.uk/project /home/user/public --force
However I would like to create a post-commit
script under the hooks
directory which uses this same svn export
command but only exports the files which have changed (including any deletes/renames/moves), otherwise each time I commit it will take too long to update the test server.
Other answers on Stack Overflow have involved the use of the svn up
command which is not relevant to me as the test-server copy is not a working copy
but just an export, or have involved the use of an external script (Python or Perl) which is also not what I'm looking for. Just a plain and simple bash script will do just fine ;)
You can:
svn diff
by svnlook changed
(at post-processing of output also) for getting changes in single revision in more clean form