[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Shadow/Mirror hook script

From: allan juul <allan_at_muly.dk>
Date: 2005-06-02 00:47:54 CEST

Nathaniel Case wrote:

> I noticed that a few people have asked about a feature that would
> automatically mirror the latest version of a repository to a 'shadow' copy.
>
> I also needed this, so I wrote a post-commit hook script to do it
> (attached). It works by using svnlook to determine what has changed,
> and then implements those changes (modify, add, delete) to the target
> shadow directory.
>
> The first time the script is ran, it will do a full export to the target
> directory. Subsequent runs should do the incremental changes. It's
> smart enough to track the last version it sync'd with, so it will sync
> with all versions it hasn't sync'd with yet in the history (though this
> shouldn't be necessary assuming it runs successfully on each commit).
>
> This should be nicer than other alternatives for many use cases, since
> you don't have to do a full export each time, and you also don't
> unnecessarily have the .svn directories in the shadow directory.
>
> It hasn't been heavily tested however, so I would appreciate any
> feedback. See the comments at the top of the script for example usage.
>
> - Nate Case <ncase@xes-inc.com>
>

looks neat !
havent tried yet -so just out of curiousity, what happens if multiple
people commit multiple files simultaneously ?

./allan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 2 00:49:34 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.