On Feb 26, 2011, at 2:47 PM, Ryan Schmidt wrote:
On Feb 25, 2011, at 13:53, Blair Zajac wrote:
On 2/25/11 11:39 AM, Christopher D Haakinson wrote:
Now I've come to the point in my development where I need to
figure out what's
the best method for transferring my svn files to my live site.
I've read that I should use a post-commit hook, which is fine I'm
using a
pre-commit hook already so I'm aware of how they work.
My main question is: Which method is best for updating my live
files? Should I
use rsync in my post hook or should I use svn update?
http://subversion.apache.org/faq.html#website-auto-update this
page recommends
using svn update, but I wanted to get some input from the
community too.
Thanks in advance!
First, both svn and rsync do atomic replaces of the file, so you
don't have to worry about the live files being observed in some odd
state.
Of course you do. The individual files may be atomically replaced,
but the entire set of files won't be. If, like most web sites, your
site is made with a scripting language, and file A includes file B,
and both files have been changed, there will probably be a time
during the update when A has been updated and B has not, or vice
versa.
Well, you're going past the original question. Neither rsync nor svn
help with that case, as there aren't atomic updates to sets of files,
which you state in the thread linked below.
Here is a previous discussion with recommendations. See especially
the paragraph that starts "For finally deploying a site to the
production server" and the example that follows:
http://svn.haxx.se/users/archive-2009-04/0083.shtml
Right, the symlink approach gets you 90% there.
But even this doesn't get you 100% of the way there, if the browser
downloads C and D and in between the symlink is changed (not talking
about when A includes B that is a single GET).
Blair