[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: smakawhat <smakawhat_at_yahoo.com>
Date: 2007-03-12 15:21:27 CET

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?
  Thanks for your patience on this.
Ryan Schmidt <subversion-2007a@ryandesign.com> wrote:
  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 
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.
Received on Mon Mar 12 15:21:54 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.