Thanks Chris! I wish I would have known about SVN::Notify::Mirror before I wrote my Perl script--guess I should spend more time searching CPAN first. ;)
It appears to have a great deal of capability from what I gleaned from skimming the documentation. I may play around with it later when I have some more time, but for now I have my post-commit script working for our current needs and I need to get back to doing some real work. %^)
Thanks again for all your help. I really appreciate it.
From: Chris Shelton [mailto:cshelton_at_shelton-family.net]
Sent: Friday, March 05, 2010 10:21 AM
To: Craig Thayer
Subject: Re: Perl can't find my libraries when run via the subversion post-commit script
On Fri, Mar 5, 2010 at 9:52 AM, Craig Thayer <CThayer_at_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:
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
Received on 2010-03-05 18:04:08 CET