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

Re: Post-commit hook tutorials?

From: Robert Denton <robert_at_headsprout.com>
Date: Fri, 29 Feb 2008 10:24:30 -0800

Thanks for the response! I'll feast on what you have given me for a while and see how far it takes me. As it happens, the SVN server (linux) and the destination server (Windows) are not the same server so I'll have to figure something out there. But this is great help already, so thanks!

Robert
  _____

From: John Peacock [mailto:john.peacock_at_havurah-software.org]
To: Robert Denton [mailto:robert_at_headsprout.com]
Cc: users_at_subversion.tigris.org
Sent: Thu, 28 Feb 2008 17:38:47 -0800
Subject: Re: Post-commit hook tutorials?

Robert Denton wrote:
> If any file is committed in a specific SVN directory, copy that file to
> a windows file server via UNC (or any other means). Any suggestions
> would be great. Thanks!
  
  Here's the short answer - Don't write your own hooks (see below)!
  
  Here's the explanation why:
  
   http://svn.haxx.se/users/archive-2007-10/0498.shtml
  
  Here's how to use someone else's hard work, so you have more time to play
  [insert your favorite time waster here]:
  
  Install SVN::Notify::Mirror[1] and SVN::Notify::Config[2]. Write a post-commit
  file like this:
  
           #!/usr/bin/perl -MSVN::Notify::Config=$0
           --- #YAML:1.0
           '':
             PATH: "C:/Subversion/bin"
           'path/in/repository':
             handler: Mirror
             minimal: 1
             to: "/path/to/www/htdocs"
  
  and you are done (if the repository is local to the destination that is). If
  your Subversion server is Windows (my condolences), you are going to have to
  write a CMD file wrapper.
  
  You won't be able to use UNC paths from a service account on Windows (because
  those are specifically limited to local machine access only). You could use
  SVN::Notify::Mirror::SSH (if you can install SSH on the remote server) which I
  have done quite successfully at my previous job. Or you can prod me a little
  and I'll write an FTP subclass... ;-)
  
  HTH
  
  John
  
  1) http://search.cpan.org/search?query=SVN::Notify::Mirror
  2) http://search.cpan.org/search?query=SVN::Notify::Config
    
Received on 2008-02-29 19:25:11 CET

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.