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

Re: hook deployment script

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-03-10 05:01:34 CET

On Mar 9, 2007, at 13:39, smakawhat wrote:

> I already emailed the list in regards to some basic concepts of
> subversion. I am at the point where I am discovering that in order
> to get the changes made commited to the repository I will need to
> use something like a post commit hook script.

Maybe you just mistyped, but to make sure: when you commit, the
changes are made to the repository. If you then want those changes to
be copied to a real folder on the server, for example because you
want to serve it as a web page, then yes, you need to write a post-
commit hook to do that.

> My understanding from what I have been googling is you can write
> these in any language just make it executable. I notice I think
> most people tend to write them in PERL.
>
> My question is how do I know what to copy in the script cause I
> want to copy only what is new. Being doing some Googlin and just
> finding lots of email examples but nothing related to copying (kind
> of like deploying), or use of variables, syntax meaning etc...

Your post-commit hook is given the path to the repository and the
revision number. You can pass that information to "svnlook changed"
to determine what changed.

Rather than writing the rather complicated script needed to properly
handle additions, modifications and removals of files and directories
in this fashion, you could just make the directory on the server a
working copy, and issue an "svn up" command in the post-commit hook
to get it updated.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 10 05:02:10 2007

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.