Return-Path: Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: (qmail 10732 invoked from network); 25 Feb 2011 19:54:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 19:54:27 -0000 Received: (qmail 705 invoked by uid 500); 25 Feb 2011 19:54:26 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 671 invoked by uid 500); 25 Feb 2011 19:54:26 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 664 invoked by uid 99); 25 Feb 2011 19:54:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 19:54:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of blair@orcaware.com designates 108.0.197.17 as permitted sender) Received: from [108.0.197.17] (HELO orca3.orcaware.com) (108.0.197.17) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 19:54:18 +0000 Received: from dhcp-cisco-vpn-172-30-6-17.spimageworks.com (localhost [127.0.0.1]) by orca3.orcaware.com (8.14.3/8.14.3/Debian-9.2ubuntu1) with ESMTP id p1PJrtq2014037; Fri, 25 Feb 2011 11:53:55 -0800 Message-ID: <4D6808D3.4070707@orcaware.com> Date: Fri, 25 Feb 2011 11:53:55 -0800 From: Blair Zajac User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Christopher D Haakinson CC: users@subversion.apache.org Subject: Re: svn update or rsync - which is best to update live files References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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? > > 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. 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 destination. Probably for speed, your best bet is to time either. In 1.7, I would definitely use svn, as the locking issue goes away. Blair