Uploading svn repository changes directly to a Pro

2020-07-18 06:47发布

问题:

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.



标签: svn command