Uploading svn repository changes directly to a Production Server?

泪湿孤枕 提交于 2019-12-06 05:45:13

问题


Is it possible that i could upload my changes from the svn repository directly to my production server(2nd copy containing all the data as origional copy but for testing purposes)?

I mean is there a way i could do it without EXPORT-> Then manually copy paste to production server...

If yes, how can i do that?

any pitfalls?

Thanks


回答1:


One option (if you don't want to have the .svn subdirectories in your production site) is to do checkout to a different area on the disk, then update that periodically, and then rsync that across to the production site using a command such as

rsync -a --exclude='*/.svn/*' checkout_dir site_dir

The svn update and rsync commands will run very quickly compared to doing a full svn export every time.




回答2:


I assume you're currently svn exporting your files to your server... if that's the case, you could instead just svn checkout on your production machine and svn up when you've made changes to the repository, and that'll only sync the files you've changed. If you go this route, it's of course important to restrict access via your web server's configuration (assuming this is a web app) to any .svn directories.

See this SO post for a better explanation.



来源:https://stackoverflow.com/questions/4159104/uploading-svn-repository-changes-directly-to-a-production-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!