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

RE: Post comit hook website update

From: Anthony Williams <anthony_at_warwickcontrol.com>
Date: 2006-03-21 11:44:45 CET

If you want to go down the rsync route for this (or indeed any other
problem) I use this port of rsync to windows: http://itefix.no/cwrsync/
which of course will also work between networks in the same way as FTP will.

Regards,
Anthony Williams

-----Original Message-----
From: users-return-46793-anthony=warwickcontrol.com@subversion.tigris.org
[mailto:users-return-46793-anthony=warwickcontrol.com@subversion.tigris.org]
On Behalf Of MrBr @ GMail
Sent: 21 March 2006 10:29 AM
To: Ryan Schmidt
Cc: users@subversion.tigris.org
Subject: Re: Post comit hook website update

Hi Ryan
Thanks for a answer.
 
There is some problems using your idea.
1) RSYNC is an Unix only program, it can't be used by Windows. Both of my
servers are windows based.
2) The servers aren't on the same network so I have to use somthing like FTP
to transfer files.
 
I thought to use post commit script to send the file over the ftp, but the
post comit scrip is provided only with the folloing arguments "the path to
the repository, and the new revision number that was created" (accoring to
the manual).
Is there any way to know wich files were changed and to transfer them
maintaing the directory sructure?

 
On 3/21/06, Ryan Schmidt <subversion-2006Q1@ryandesign.com> wrote:

        On Mar 21, 2006, at 10:42, MrBr @ GMail wrote:
        
> I want to update my web server with the newest revision after
> committing a revision.
> The problem is that keeping a working copy on the web server in
not
> an option.
> There should be only the source code and nothing more.
> The web server is off site.
> The SVN server is windows+svn+Apache
        
        So your repository server and your web server are two different
        machines. No problem. In your post-commit hook, you could use "svn
        export" to create an export of the HEAD of the repository, somewhere

        on the repository server. You could then use rsync to send only the
        relevant changes over to the web server. You would need to either do
        this entire task before exiting the post-commit hook, which may take
        some time and annoy your committers, or you need to spawn off
another
        task in the post-commit hook, but if you do that, you must handle
        concurrency issues. (What happens if two people commit changes very
        close together such that the second commit happens while the update
        launched by the first commit is still running?)
        
        That would work well on Linux/Unix/*BSD/OSX machines; unfortunately
I
        have no knowledge of what will or will not work on a Windows
machine.
        
        
        

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 21 11:45:51 2006

This is an archived mail posted to the Subversion Users mailing list.