Craig, On Fri, Mar 5, 2010 at 9:52 AM, Craig Thayer <ctha...@sensorlogic.com> wrote: > Thanks again David. > > The reason for the post-commit hook is to pull certain files out of > Subversion and write them to our server. For example, if > tools/perl/trunk/lib/foo.pm is updated we want it to be copied to > /usr/lib/perl5/site_perl/foo.pm automatically upon commit. > > I am using the svnlook command in the script now to get the 'changed' and > 'info' data from the commit operation to determine if any file changed or > added is one that we need on our server (i.e., we're attempting to automate > our manual process of fetching key Subversion files and psftp'ing them to the > server). The files are a mix of text and binary files. > > I was unaware that svnlook had a 'cat' operation, but I'm concerned that if > it fails in any way it will overwrite and trash the target file with its > error output the same way that 'svn cat' did. > > However, I will try it since svnlook doesn't need the credentials to extract > the file.
If you are able to let the web server user to create working copies, you may want to consider using the SVN::Notify::Mirror perl module: http://search.cpan.org/~jpeacock/SVN-Notify-Mirror-0.038/lib/SVN/Notify/Mirror.pm I've been using this module to automate a svn update on our test web server, which runs from a set of working copies from our repository. The SVN::Notify module also supports the creation of very configurable post-commit email messages. Once I worked through the syntax of the config file, this approach has worked well, with only a few rare hiccups. chris