NAME

SVN::Notify::Mirror - Keep a mirrored working copy of a repository path

SYNOPSIS

Use svnnotify in post-commit:

svnnotify --repos-path "$1" --revision "$2" \
 --handler Mirror --to "/path/to/www/htdocs" \
 [--svn-binary /full/path/to/svn] \

or better yet, use SVN::Notify::Config for a more sophisticated setup:

#!/usr/bin/perl -MSVN::Notify::Config=$0
--- #YAML:1.0
'':
  PATH: "/usr/bin:/usr/local/bin"
'path/in/repository':
  handler: Mirror
  to: "/path/to/www/htdocs"
'some/other/path/in/repository':
  handler: Mirror
  to: "/path/to/remote/www/htdocs"

DESCRIPTION

Keep a directory in sync with a portion of a Subversion repository. Typically used to keep a development web server in sync with the changes made to the repository. This directory can either be on the same box as the repository itself, or it can be remote (via SSH connection).

USAGE

Depending on whether the target is a "Local Mirror" or a "Remote Mirror", there are different options available. All options are available either as a commandline option to svnnotify or as a hash key in SVN::Notify::Config (see their respective documentation for more details).

Working Copy on Mirror

Because 'svn export' is not able to be consistently updated, the sync'd directory must be a full working copy, and if you are running Apache, you should add lines like the following to your Apache configuration file:

# Disallow browsing of Subversion working copy
# administrative directories.
<DirectoryMatch "^/.*/\.svn/">
 Order deny,allow
 Deny from all
</DirectoryMatch>

The files in the working copy must be writeable (preferrably owned) by the user identity executing the hook script (this is the user identity that is running Apache or svnserve respectively).

Local Mirror

Used for directories local to the repository itself (NFS or other network mounted drives count). The only required options are:

  • handler = Mirror

    Specifies that this module is called to process the Notify event.

  • to = /path/to/working/copy

    Specified which directory should be updated.

Remote Mirror

Used for mirrors on some other box, e.g. a web server in a DMZ network. See SVN::Notify::Mirror::SSH or SVN::Notify::Mirror::Rsync for more details.

AUTHOR

John Peacock <jpeacock@cpan.org>

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

SVN::Notify, SVN::Notify::Config

1 POD Error

The following errors were encountered while parsing the POD:

Around line 179:

You forgot a '=back' before '=head1'