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

RE: Re: Post-commit hook tutorials?

From: DePriest Richard 403 <richard.depriest_at_crackerbarrel.com>
Date: Fri, 29 Feb 2008 09:04:03 -0600

This is great. Now if someone would give me an example how to check the
svn:needs-lock=true property, I would be off and running.

-----Original Message-----
From: John Peacock [mailto:john.peacock_at_havurah-software.org]
Sent: Thursday, February 28, 2008 7:39 PM
To: Robert Denton
Cc: users_at_subversion.tigris.org
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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-29 16:05:18 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.