Suggest a good way to update staging server using svn

Updating a copy on a staging server using svn up and then running the cp command to copy the files from the updated copy to the server copy always takes a long time when there are more than 10 files. Can you suggest me a way to do this without copying the .svn files and saving time? Writing a bash script is my goal to solve this problem. Can I use rsync?

+2


source to share


2 answers


I think you are asking how you can update files on the target server from Subversion?!? If so...

Use Subversion svn export.



svn export --force https://urlofsvnhost/repo/product/branches/stable /path/to/www/public

      

This will export the contents of the subversion folder without any .svn folders.

+2


source


We have a post-commit to rsync binding setup (with appropriate exceptions) for each of our servers.

rsync --exclude-from 'excludes_file' -av --del /local/path/ remote:/remote/path

      

The excluding file we are using has .svn as a template.



You can also just

rsync --exclude '.svn' ....

      

rsync

0


source







All Articles