[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 [trying svn up]

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-03-13 11:08:42 CET

On Mar 12, 2007, at 09:21, smakawhat wrote:

>> > 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.
>
> I decided to go with the idea of making a working copy in the
> website development server. In order to do this do I had to
> recreate a new folder and rename it cause it was what I originally
> imported.
>
> I took my local copy on my workstation, commited the changes. I
> went to a command prompt first and used the svn up command to see
> if the file in the repository would transfer up. I typed in C:\svn
> up but I got the message: Skipped ','
>
> Any ideas?

So you have a working copy on the server somewhere, which is used to
serve the web site. Your web server's configuration files point at
this working copy. The working copy is in, let's say, C:\Documents
\MyWebSite, because you ran, say, "svn checkout $REPO/path/to/
mywebsite/trunk C:\Documents\MyWebSite"

Then your post-commit hook should contain the line "C:\Path\To
\svn.exe C:\Documents\MyWebSite"

-- 
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 Tue Mar 13 11:09:06 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.