subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blair Zajac <>
Subject Re: svn update or rsync - which is best to update live files
Date Fri, 25 Feb 2011 19:53:55 GMT
On 2/25/11 11:39 AM, Christopher D Haakinson wrote:
> Hi, I have subversion up and running quite well now(thanks to everyone here :-))
> 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?
> 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.

There are tradeoffs.

- rsync will need to stat() each file in your working copy
- svn will only update the files that are newer; however
- svn currently requires a lock on each subdirectory

rsync will have two times the stat()'s, one for the source and one for the 

Probably for speed, your best bet is to time either.

In 1.7, I would definitely use svn, as the locking issue goes away.


View raw message