Updating a copy on staging server using svn up and later doing cp command to copy the files from the updated copy to the server copy is always time consuming when there are more than 10 files. Can you suggest me a way of how to do this without copying the .svn files and also saving time? Writing bash script is my aim to resolve this issue. Can I use rsync ?
+2
A:
I think you are asking how can you get updated files to a target server from Subversion?!? If so...
Use Subversion's svn export.
svn export --force https://urlofsvnhost/repo/product/branches/stable /path/to/www/public
This will export the subversion folder contents w/o any .svn folder turds.
randy melder
2009-10-13 23:39:09
Thanks for your answer Randy,I am aware of svn export ..But to be more specific what is the solution when we have just 20 files that has changed and rest 500 files have not changes.There are certain files containing the settings for the staging server is different from the local working copy and those should not be changed at all.
Nuance
2009-10-14 16:56:36
I dont know if this is possible - but can you consider calling such prperty files specific to a particular host liek your stagin server by a different name. The files containing hosst settings must ideally never be version controlled and it is a better pracctice to have them in a non versioned file on the host (inside your working copy if its a SVN workspace you are using) and be referred to when required. I know this may not be a great help - but just in case it is somethingyou can consider, it might be worth it.
Critical Skill
2009-10-15 09:04:03
A:
We have our post-commit hook setup to rsync (with appropriate excludes) to each of our servers.
rsync --exclude-from 'excludes_file' -av --del /local/path/ remote:/remote/path
The excludes file we are using has .svn as a pattern.
You could also just
rsync --exclude '.svn' ....
jasonbar
2010-02-23 22:14:51