|1. postcommit script||Add a line to an existing postcommit script that sets the --handler commandline option to Snapshot. This method has the drawback that it will require multiple Perl interpreters to start up (one per handler line), which <B>willB> delay the commit from completing on the client. Unless you use --to-regex-map, it will also mean that each line will be called for each revision committed, even if the path of interest hasnt changed.|
|2. SVN::Notify::Config stanza||Multiple handlers can be configured in a single SVN::Notify::Config YAML file, which acts both as the configuration data as well as the postcommit script itself. This method also ensures that the Snapshot handler will only be called when a change is made to the associated path (like --to-regex-map in the commandline case).|
In addition to all of the options available to the base SVN::Notify class, there are several that are specific to the Snapshot handler.
This commandline argument specifies the portion of the repository to take snapshot from, is not optional. It will be automatically set when using either --to-regex-map or when executed within a SVN::Notify::Config script, however.
By default, the base path inside the snapshot will be the basename of the --to argument, but you may override it with --snapshot-base. For example, if you are taking a snapshot of project1/trunk, you may want to set the snapshot-base to project1 instead.
If you are passing both the --revision and --to arguments to svnnotify on the commandline, you can always construct the filename to include the revision by using shell substitution variables (like the example in the SYNOPSIS. However, if you are using a YAML config file or the --to-regex-map commandline option, you may want to use the append-rev option, which will insert a hyphen and the revision into the destination filename between the basename and the suffix.
For example, in the SYNOPSIS above, the YAML stanza will generate files like:
/srv/www/htdocs/snapshot-1.tgz /srv/www/htdocs/snapshot-5.tgz /srv/www/htdocs/snapshot-6.tgz
assuming that the /project1/trunk changed in revs 1, 5, and 6.
John Peacock <firstname.lastname@example.org>
Autrijus Tang <email@example.com>
No bugs have been reported.
Copyright (c) 2007-2008 John Peacock <firstname.lastname@example.org>.
Portions copyright 2004 by Autrijus Tang <email@example.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||SVN::NOTIFY::SNAPSHOT (3)||2016-04-03|