@@ -1,412 +1,433 @@
Revision history for SVN-Hooks. -*- text -*-
+1.27 2014-08-09 17:04:45 America/Sao_Paulo
+
+ [Fixes]
+
+ - UpdateConfFile: Fix detection of paths outside of the repository's conf
+ directori when specified as a TO argument to the UPDATE_CONF_FILE
+ directive.
+
+ - CheckJira: Fix default value for CHECK_JIRA_CONFIG 4th argument.
+
+1.26 2014-07-04 10:48:58 America/Sao_Paulo
+
+ [Changes]
+
+ - Add directive CHECK_JIRA_DISABLE to SVN::Hooks::CheckJira to disable all
+ CHECK_JIRA directives.
+
+ - Make hooks execute in the order they are defined. Previously, the
+ execution order was unspecified. (Change kindly contributed by
+ DC. Thanks!)
+
1.25 2014-04-13 16:50:07 America/Sao_Paulo
- [Fixes]
+ [Fixes]
- - UpdateConfFile: the specification of a subdirectory as the
- destination file wasn't working.
+ - UpdateConfFile: the specification of a subdirectory as the
+ destination file wasn't working.
1.24 2014-03-16 23:31:06 America/Sao_Paulo
- [Fixes]
+ [Fixes]
- - CheckMimeTypes: disregard symbolic links because they don't need to
- have the svn:mime-type property set.
+ - CheckMimeTypes: disregard symbolic links because they don't need to
+ have the svn:mime-type property set.
- - UpdateConfFile: create non-existing directories if the 'to'
- specification contains directories they are created if they don't
- exist.
+ - UpdateConfFile: create non-existing directories if the 'to'
+ specification contains directories they are created if they don't
+ exist.
1.23 2013-11-22 08:13:25 America/Sao_Paulo
- [Fixes]
+ [Fixes]
- - Some tests were failing when run with Subversion 1.8 because
- of changes in the 'svn propset' command.
+ - Some tests were failing when run with Subversion 1.8 because
+ of changes in the 'svn propset' command.
1.22 2013-11-19 11:19:06 America/Sao_Paulo
- [Changes]
+ [Changes]
- CheckJira: accept and disregard spaces in the "projects"
- specification.
+ CheckJira: accept and disregard spaces in the "projects"
+ specification.
- [Fixes]
+ [Fixes]
- The META.yml information which is automatically generated from
- Github had a wrong URL for the module repository.
+ The META.yml information which is automatically generated from
+ Github had a wrong URL for the module repository.
1.21 2013-06-18 09:36:02 America/Sao_Paulo
- UpdateConfFile implements a new option 'remove' which, when
- set, makes the configuration file in the server be removed if
- the its versioned counterpart is removed from the repository.
+ UpdateConfFile implements a new option 'remove' which, when
+ set, makes the configuration file in the server be removed if
+ the its versioned counterpart is removed from the repository.
1.20 2013-06-12 15:08:11 America/Sao_Paulo
- In CheckJira, the PROJKEYS in a 'projects' option may now have
- spaces around the comma separating project keys.
+ In CheckJira, the PROJKEYS in a 'projects' option may now have
+ spaces around the comma separating project keys.
- Fix UpdateConfFile. It was considering only the fist
- added/updated file in a commit for updating.
+ Fix UpdateConfFile. It was considering only the fist
+ added/updated file in a commit for updating.
- Fix CheckStructure numeric else-clause detection. Also, fix
- its documentation to say that negative values are also treated
- as true. Only zeroes are considered false. (Thanks to Uwe
- Satthoff for bringing this to my attention!)
+ Fix CheckStructure numeric else-clause detection. Also, fix
+ its documentation to say that negative values are also treated
+ as true. Only zeroes are considered false. (Thanks to Uwe
+ Satthoff for bringing this to my attention!)
1.19 2012-06-24 15:12:56 America/Sao_Paulo
- Fix example/check-mergeinfo.pl.
+ Fix example/check-mergeinfo.pl.
1.18 2012-05-21 13:06:06 America/Sao_Paulo
- Implement 'exclude' option for CHECK_JIRA directive.
+ Implement 'exclude' option for CHECK_JIRA directive.
1.17 2012-05-01 18:07:52 America/Sao_Paulo
- Use Data::Util to make for cleaner code.
+ Use Data::Util to make for cleaner code.
1.16 2012-04-21 21:35:48 America/Sao_Paulo
- Moved from Google Code to GitHub.
+ Moved from Google Code to GitHub.
1.15 2012-04-19 23:06:42 America/Sao_Paulo
- Fix and optimize example/check-mergeinfo.pl.
+ Fix and optimize example/check-mergeinfo.pl.
1.14 2012-04-19 22:22:39 America/Sao_Paulo
- Implement example/check-mergeinfo.pl showing how to garantee
- that merges are performed only on allowed places.
+ Implement example/check-mergeinfo.pl showing how to garantee
+ that merges are performed only on allowed places.
1.13 2012-03-05 11:49:34 America/Sao_Paulo
- Fix RT#75547 by making Windows test scripts non-verbose.
- (Thanks Mike Brimer!)
+ Fix RT#75547 by making Windows test scripts non-verbose.
+ (Thanks Mike Brimer!)
1.12 2012-02-25 23:34:48 America/Sao_Paulo
- Convert distribution to Dist::Zilla.
+ Convert distribution to Dist::Zilla.
1.11 2011-12-04
- Fix UpdateConfFile's shell command invokation.
+ Fix UpdateConfFile's shell command invokation.
1.10 2011-11-09
- Pass the SVN::Look object as the third argument to the
- validator, generator, and actuator in UpdateConfFile.
+ Pass the SVN::Look object as the third argument to the
+ validator, generator, and actuator in UpdateConfFile.
-1.09 2011-11-02
+1.09 2011-11-02
- Document importance of defining the PATH properly and set it
- properly in the hooks used during testing. (This was a problem
- in FreeBSD systems.)
+ Document importance of defining the PATH properly and set it
+ properly in the hooks used during testing. (This was a problem
+ in FreeBSD systems.)
- Repository moved to git (http://code.google.com/p/svn-hooks/source).
+ Repository moved to git (http://code.google.com/p/svn-hooks/source).
1.08 2011-09-26
- Deprecate SVN::Hooks::Mailer. Its directives now produce
- errors.
+ Deprecate SVN::Hooks::Mailer. Its directives now produce
+ errors.
1.07 2011-08-27
- Requiring at least svnlook version 1.4.0.
+ Requiring at least svnlook version 1.4.0.
-1.06 2011-08-21
+1.06 2011-08-21
- Checking in Makefile.PL if we can exec svnlook. Just
- specifying the dependency from SVN::Look in it doesn't do.
+ Checking in Makefile.PL if we can exec svnlook. Just
+ specifying the dependency from SVN::Look in it doesn't do.
-1.05 2011-08-12
+1.05 2011-08-12
- Fixing a bug in the new DENY_FILENAMES_PER_PATH directive.
+ Fixing a bug in the new DENY_FILENAMES_PER_PATH directive.
-1.04 2011-08-11
+1.04 2011-08-11
- Implementing directive DENY_FILENAMES_PER_PATH in
- SVN::Hooks::DenyFilenames.
+ Implementing directive DENY_FILENAMES_PER_PATH in
+ SVN::Hooks::DenyFilenames.
-1.03 2011-07-30
+1.03 2011-07-30
- SVN::Hooks::CheckJira's check_one and check_all_svnlook checks
- now get a SVN::Look object to make it possible to grok
- information about the commit.
+ SVN::Hooks::CheckJira's check_one and check_all_svnlook checks
+ now get a SVN::Look object to make it possible to grok
+ information about the commit.
- Tests made a little more robust.
+ Tests made a little more robust.
-1.02 2011-07-27
+1.02 2011-07-27
- Porting Makefile.PL to Windows.
- Adjusting dependency from SVN::Look version.
- Supporting absolute file names for SVN::Hooks configuration files.
- Adding URI::file to the dependencies.
+ Porting Makefile.PL to Windows.
+ Adjusting dependency from SVN::Look version.
+ Supporting absolute file names for SVN::Hooks configuration files.
+ Adding URI::file to the dependencies.
-1.01 2011-07-21
+1.01 2011-07-21
- Avoiding dependency from File::Slurp in the tests.
+ Avoiding dependency from File::Slurp in the tests.
-1.00 2011-07-20
+1.00 2011-07-20
- Ported to Windows with Strawberry Perl and with Active Perl.
+ Ported to Windows with Strawberry Perl and with Active Perl.
-0.91 2011-07-07
+0.91 2011-07-07
- CHECK_JIRA_CONFIG accepts a fifth argument to match JIRA
- project keys.
+ CHECK_JIRA_CONFIG accepts a fifth argument to match JIRA
+ project keys.
- Fixes an error on UpdateConfFile.
+ Fixes an error on UpdateConfFile.
- Configuration files should be optional, but they were always
- required. Now it's fixed.
+ Configuration files should be optional, but they were always
+ required. Now it's fixed.
-0.90 2011-05-14
+0.90 2011-05-14
- Big refactoring of the code base. Implements hook directives
- in SVN::Hooks and simplifies the implementation and
- configuration of plugins.
+ Big refactoring of the code base. Implements hook directives
+ in SVN::Hooks and simplifies the implementation and
+ configuration of plugins.
- Revises the POD documentation.
+ Revises the POD documentation.
- Deprecates SVN::Hooks::Generic.
+ Deprecates SVN::Hooks::Generic.
- Preparing for a 1.00 release.
+ Preparing for a 1.00 release.
0.33 2011-01-16
- Corrects a few gotchas in the test suite.
+ Corrects a few gotchas in the test suite.
-0.32 2010-12-10
+0.32 2010-12-10
- Corrects some long standing errors in the arguments passed to
- some hooks.
+ Corrects some long standing errors in the arguments passed to
+ some hooks.
- Corrects some hard errors in the SVN::Hooks::Generic plugin
- and enhances its test suite.
+ Corrects some hard errors in the SVN::Hooks::Generic plugin
+ and enhances its test suite.
-0.31 2010-12-09
+0.31 2010-12-09
- Implements the SVN::Hooks::Generic plugin to allow for the
- easy creation of custom hooks.
+ Implements the SVN::Hooks::Generic plugin to allow for the
+ easy creation of custom hooks.
- Corrects CheckJira's "projects" verification.
+ Corrects CheckJira's "projects" verification.
-0.30 2010-10-07
+0.30 2010-10-07
- Small adjustment in some test cases to accomodate changes in
- Perl 5.13.5.
+ Small adjustment in some test cases to accomodate changes in
+ Perl 5.13.5.
-0.29 2010-10-06
+0.29 2010-10-06
- Extends the syntax of DENY_FILENAME directive to allow
- customized error messages.
+ Extends the syntax of DENY_FILENAME directive to allow
+ customized error messages.
-0.28 2010-04-28
+0.28 2010-04-28
- Being more careful during tests.
+ Being more careful during tests.
0.27 2010-03-09
- Substitutes DENY_EXCEPT_USERS for DENY_EXEMPT_USERS.
- (My wife asked me to change it.)
+ Substitutes DENY_EXCEPT_USERS for DENY_EXEMPT_USERS.
+ (My wife asked me to change it.)
0.26 2010-03-08
- Implements the DENY_EXEMPT_USERS directive in DenyChanges.
+ Implements the DENY_EXEMPT_USERS directive in DenyChanges.
0.25 2010-01-19
- Add a 'post_action' pseudo-check to CheckJira so that the
- plugin can perform an action during the post-commit hook
- phase.
+ Add a 'post_action' pseudo-check to CheckJira so that the
+ plugin can perform an action during the post-commit hook
+ phase.
-0.24 2010-01-06
+0.24 2010-01-06
- Applies a spelling errors patch by Angel Abad.
+ Applies a spelling errors patch by Angel Abad.
0.23 2009-10-24
- Add kwalitee tests. (See
- http://cpants.perl.org/dist/overview/SVN-Hooks)
+ Add kwalitee tests. (See
+ http://cpants.perl.org/dist/overview/SVN-Hooks)
-0.22 2009-09-23
+0.22 2009-09-23
- New hook: CheckCapability.
+ New hook: CheckCapability.
-0.21 2009-08-19
+0.21 2009-08-19
- The pod tests are skipped by default unless you use
- perl Makefile.PL --author-tests.
+ The pod tests are skipped by default unless you use
+ perl Makefile.PL --author-tests.
-0.20 2009-07-28
+0.20 2009-07-28
- Reverting the change in 0.19 and better documenting the
- CHECK_JIRA behaviour.
+ Reverting the change in 0.19 and better documenting the
+ CHECK_JIRA behaviour.
- Updating SVN::Hooks documentation.
+ Updating SVN::Hooks documentation.
-0.19 2009-07-28
+0.19 2009-07-28
- Corrects a bug in CheckJira.
+ Corrects a bug in CheckJira.
-0.18 2009-07-24
+0.18 2009-07-24
- Corrects two bugs.
+ Corrects two bugs.
- Drops the sub-minor versions.
+ Drops the sub-minor versions.
0.17 2009-04-26
- Implements the CheckJira plugin and deprecates JiraAcceptance.
+ Implements the CheckJira plugin and deprecates JiraAcceptance.
- Make Makefile.PL know about online tests.
+ Make Makefile.PL know about online tests.
0.16 2009-04-12
- Implements the AllowPropChange plugin.
+ Implements the AllowPropChange plugin.
- Better document the CheckProperty plugin.
+ Better document the CheckProperty plugin.
- Accepts relative paths in CHECK_STRUCTURE.
+ Accepts relative paths in CHECK_STRUCTURE.
0.15 2009-03-12
- Corrects a nasty bug in CheckStructure.
+ Corrects a nasty bug in CheckStructure.
- Corrects some problems with the test scripts that prevented
- them to work right in some environments.
+ Corrects some problems with the test scripts that prevented
+ them to work right in some environments.
- Implements the function
- SVN::Hooks::CheckStructure::check_structure.
+ Implements the function
+ SVN::Hooks::CheckStructure::check_structure.
0.14 2009-02-08
- JiraAcceptance: don't replay the user's log in the error
- message.
+ JiraAcceptance: don't replay the user's log in the error
+ message.
- Removed LICENSE file because it was inconsistent with the
- licensing information in META.yml.
+ Removed LICENSE file because it was inconsistent with the
+ licensing information in META.yml.
- UpdateConfFile:
- - It accepts an 'actuator' function to be executed in the
- post-commit hook after a succesful commit.
- - All functions (validator, generator, and actuator) receive
- the same two parameters: the file contents and the file
- relative path in the repository.
- - The files to be updated can be specified via Regexps and
- they can be copied to subdirectories of /repo/conf.
+ UpdateConfFile:
+ - It accepts an 'actuator' function to be executed in the
+ post-commit hook after a succesful commit.
+ - All functions (validator, generator, and actuator) receive
+ the same two parameters: the file contents and the file
+ relative path in the repository.
+ - The files to be updated can be specified via Regexps and
+ they can be copied to subdirectories of /repo/conf.
-0.13 2008-12-03
+0.13 2008-12-03
- Moving code to http://code.google.com/p/svn-hooks/.
- Improving some tests.
+ Moving code to http://code.google.com/p/svn-hooks/.
+ Improving some tests.
-0.12 2008-10-09
+0.12 2008-10-09
- Updating documentation at lib/SVN/Hooks.pm and
- lib/SVN/Hooks/CheckProperty.pm.
+ Updating documentation at lib/SVN/Hooks.pm and
+ lib/SVN/Hooks/CheckProperty.pm.
-0.11 2008-10-04
+0.11 2008-10-04
- Implemented new plugin SVN::Hooks::Notify which uses
- SVN::Notify. With this we deprecate the SVN::Hooks::Mailer
- plugin.
+ Implemented new plugin SVN::Hooks::Notify which uses
+ SVN::Notify. With this we deprecate the SVN::Hooks::Mailer
+ plugin.
- Using File::Spec to be a little more portable.
+ Using File::Spec to be a little more portable.
- Changed license to the license of Perl itself.
+ Changed license to the license of Perl itself.
-0.10 2008-09-27
+0.10 2008-09-27
- The Mailer plugin can send GNU-style diffs of the files
- changed in the commit.
+ The Mailer plugin can send GNU-style diffs of the files
+ changed in the commit.
-0.09 2008-09-27
+0.09 2008-09-27
- Implemented the AllowLogChange plugin to allow changes in past
- revision logs by specific users.
+ Implemented the AllowLogChange plugin to allow changes in past
+ revision logs by specific users.
- Removed dependency from Switch.pm.
+ Removed dependency from Switch.pm.
- Now the tests will check if the svn commands are available and
- be skipped otherwise.
+ Now the tests will check if the svn commands are available and
+ be skipped otherwise.
- Enabled tests: t/pod.t and t/pod-coverage.t.
+ Enabled tests: t/pod.t and t/pod-coverage.t.
- Added test t/02-allowlogchange.t.
+ Added test t/02-allowlogchange.t.
- Removed test t/boilerplate.t.
+ Removed test t/boilerplate.t.
- Private functions got the _ prefix to avoid complaints from
- pod-coverage.t.
+ Private functions got the _ prefix to avoid complaints from
+ pod-coverage.t.
-0.08 2008-09-25
+0.08 2008-09-25
- Moving SVN::Look out to its own distribution as sugested by Daniel
- Muey, the owner of its namespace.
+ Moving SVN::Look out to its own distribution as sugested by Daniel
+ Muey, the owner of its namespace.
-0.07 2008-09-23
+0.07 2008-09-23
- META.yml gets more complete.
+ META.yml gets more complete.
- Makefile.PL exits if can't find /usr/bin/svnlook.
+ Makefile.PL exits if can't find /usr/bin/svnlook.
- Some typo corrections.
+ Some typo corrections.
-0.06 2008-09-21
+0.06 2008-09-21
- All modules are documented now.
+ All modules are documented now.
- New files: LICENSE and META.yml.
+ New files: LICENSE and META.yml.
-0.05 2008-09-19
+0.05 2008-09-19
- New test t/02-jiraacceptance.t.
+ New test t/02-jiraacceptance.t.
- JiraAcceptance has a new directive: JIRA_LOG_MATCH(Regexp,
- Help). You can specify a regexp to extract the JIRA keys from a
- specific part of the log message. You can also pass a help message
- to be shown to the user if the commit fails.
+ JiraAcceptance has a new directive: JIRA_LOG_MATCH(Regexp,
+ Help). You can specify a regexp to extract the JIRA keys from a
+ specific part of the log message. You can also pass a help message
+ to be shown to the user if the commit fails.
- The error messages generated by JIRA_ACCEPTANCE are more helpful.
+ The error messages generated by JIRA_ACCEPTANCE are more helpful.
- This file was renamed from Changes to ChangeLog to make my life
- easier.
+ This file was renamed from Changes to ChangeLog to make my life
+ easier.
-0.04 2008-08-21
+0.04 2008-08-21
- New test t/02-checklog.t.
+ New test t/02-checklog.t.
- CheckMimeTypes: now accepts an optional error message to show to
- the user.
+ CheckMimeTypes: now accepts an optional error message to show to
+ the user.
- New plugin CheckLog to check the commit log message with a regexp.
+ New plugin CheckLog to check the commit log message with a regexp.
-0.03 2008-08-20
+0.03 2008-08-20
- New test t/02-mailer.t.
+ New test t/02-mailer.t.
- Removing deprecated plugin AccessControl.pm.
+ Removing deprecated plugin AccessControl.pm.
- UpdateConfFile now can rotate (a la logrotate) the files it
- updates.
+ UpdateConfFile now can rotate (a la logrotate) the files it
+ updates.
- Finished first usable version of the plugin Mailer.
+ Finished first usable version of the plugin Mailer.
- JiraAcceptance: dropped the CHECK_ suffix from the directive
- names. Also implemented the directive JIRA_CONFIG the pass the
- information needed to connect to the JIRA server.
+ JiraAcceptance: dropped the CHECK_ suffix from the directive
+ names. Also implemented the directive JIRA_CONFIG the pass the
+ information needed to connect to the JIRA server.
-0.02 2008-08-12
+0.02 2008-08-12
- Hooks::UpdateRepoFile was renamed to UpdateConfFile to make it more specific.
- But it also was enhanced in the configuration options.
+ Hooks::UpdateRepoFile was renamed to UpdateConfFile to make it more specific.
+ But it also was enhanced in the configuration options.
- Hooks::JiraAcceptance was optimized.
+ Hooks::JiraAcceptance was optimized.
- Hooks.pm now can process a list of configuration files.
+ Hooks.pm now can process a list of configuration files.
- Removed files t/01-noplugins.pl, t/svn-hook.pl, t/svn-hook.conf.
+ Removed files t/01-noplugins.pl, t/svn-hook.pl, t/svn-hook.conf.
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.008.
Changes
LICENSE
MANIFEST
@@ -28,7 +29,6 @@ lib/SVN/Hooks/JiraAcceptance.pm
lib/SVN/Hooks/Mailer.pm
lib/SVN/Hooks/Notify.pm
lib/SVN/Hooks/UpdateConfFile.pm
-perlcritic.rc
t/00-load.t
t/01-direct.t
t/02-allowlogchange.t
@@ -47,7 +47,6 @@ t/02-jiraacceptance.t
t/02-mailer.t
t/02-notify.t
t/02-updateconffile.t
-t/author-critic.t
t/release-kwalitee.t
t/release-pod-coverage.t
t/release-pod-syntax.t
@@ -1,5 +1,5 @@
---
-abstract: 'A framework for implementing Subversion hooks.'
+abstract: 'Framework for implementing Subversion hooks'
author:
- 'Gustavo L. de M. Chaves <gnustavo@cpan.org>'
build_requires:
@@ -10,7 +10,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830'
+generated_by: 'Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -35,4 +35,4 @@ resources:
bugtracker: https://github.com/gnustavo/SVN-Hooks/issues
homepage: http://search.cpan.org/dist/SVN-Hooks/
repository: git://github.com/gnustavo/SVN-Hooks.git
-version: 1.25
+version: 1.27
@@ -1,4 +1,5 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.008.
use strict;
use warnings;
@@ -9,7 +10,7 @@ use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- "ABSTRACT" => "A framework for implementing Subversion hooks.",
+ "ABSTRACT" => "Framework for implementing Subversion hooks",
"AUTHOR" => "Gustavo L. de M. Chaves <gnustavo\@cpan.org>",
"BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
@@ -41,7 +42,7 @@ my %WriteMakefileArgs = (
"URI::file" => 0,
"lib" => 0
},
- "VERSION" => "1.25",
+ "VERSION" => "1.27",
"test" => {
"TESTS" => "t/*.t"
}
@@ -1,4 +1,4 @@
-SVN::Hooks - A framework for implementing Subversion hooks.
+SVN::Hooks - Framework for implementing Subversion hooks
It comes with a bunch of plugins (actually, sub-modules of SVN::Hooks)
that implement some of the most used standalone Subversion hooks
@@ -18,7 +18,7 @@ It also comes with post-commit hooks for
But as a framework, it can be extended to implement all types of hooks.
-Copyright (c) 2012 by CPqD (http://www.cpqd.com.br/)
+Copyright (c) 2008-2014 by CPqD (http://www.cpqd.com.br/)
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -31,3 +31,10 @@
* Implement a clone of
http://svn.collab.net/viewvc/svn/trunk/contrib/hook-scripts/case-insensitive.py
+* I18N the SVN::Hooks messages.
+
+* Implement the funcionality of
+ http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/case-insensitive.py
+ as a plugin.
+
+* Increment SVN::Hooks::Notify to send emails in HTML.
@@ -25,7 +25,6 @@ exclude_match = ~$
[PodSyntaxTests]
[PodCoverageTests]
-[Test::Perl::Critic]
[Test::Kwalitee]
[GitHub::Update]
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::AllowLogChange;
{
- $SVN::Hooks::AllowLogChange::VERSION = '1.25';
+ $SVN::Hooks::AllowLogChange::VERSION = '1.27';
}
# ABSTRACT: Allow changes in revision log messages.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -67,7 +67,7 @@ SVN::Hooks::AllowLogChange - Allow changes in revision log messages.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::AllowPropChange;
{
- $SVN::Hooks::AllowPropChange::VERSION = '1.25';
+ $SVN::Hooks::AllowPropChange::VERSION = '1.27';
}
# ABSTRACT: Allow changes in revision properties.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -84,7 +84,7 @@ SVN::Hooks::AllowPropChange - Allow changes in revision properties.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckCapability;
{
- $SVN::Hooks::CheckCapability::VERSION = '1.25';
+ $SVN::Hooks::CheckCapability::VERSION = '1.27';
}
# ABSTRACT: Check the svn client capabilities.
+use strict;
+use warnings;
+
use Carp;
use SVN::Hooks;
@@ -58,7 +58,7 @@ SVN::Hooks::CheckCapability - Check the svn client capabilities.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckJira;
{
- $SVN::Hooks::CheckJira::VERSION = '1.25';
+ $SVN::Hooks::CheckJira::VERSION = '1.27';
}
# ABSTRACT: Integrate Subversion with the JIRA ticketing system.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -14,7 +14,7 @@ use JIRA::Client;
use Exporter qw/import/;
my $HOOK = 'CHECK_JIRA';
-our @EXPORT = qw/CHECK_JIRA_CONFIG CHECK_JIRA/;
+our @EXPORT = qw/CHECK_JIRA_CONFIG CHECK_JIRA CHECK_JIRA_DISABLE/;
my ($BaseURL, $Login, $Passwd, $MatchLog, $MatchKey);
@@ -39,7 +39,7 @@ sub CHECK_JIRA_CONFIG {
if (defined $MatchLog) {
is_rx($MatchLog) or croak "CHECK_JIRA_CONFIG: fourth argument must be a Regexp.\n";
} else {
- $MatchLog = qr/[A-Z]{2,}/;
+ $MatchLog = qr/(.*)/;
}
@_ >= 3 && @_ <= 5
@@ -116,6 +116,13 @@ sub CHECK_JIRA {
return 1;
}
+
+my $Disabled;
+
+sub CHECK_JIRA_DISABLE {
+ $Disabled = 1;
+}
+
sub _pre_checks {
my ($svnlook, $keys, $opts) = @_;
@@ -166,6 +173,8 @@ sub _post_action {
sub _check_if_needed {
my ($svnlook, $docheck) = @_;
+ return if $Disabled;
+
defined $BaseURL
or croak "$HOOK: plugin not configured. Please, use the CHECK_JIRA_CONFIG directive.\n";
@@ -242,7 +251,7 @@ SVN::Hooks::CheckJira - Integrate Subversion with the JIRA ticketing system.
=head1 VERSION
-version 1.25
+version 1.27
=head1 DESCRIPTION
@@ -455,6 +464,12 @@ it using the "exclude" option like this:
# other options...
});
+=head2 CHECK_JIRA_DISABLE
+
+This directive globally disables all CHECK_JIRA directives. It's useful, for
+instance, when your JIRA server must be taken down for maintenance and you
+don't want to reject Subversion commits in this period.
+
=for Pod::Coverage post_commit pre_commit
=head1 AUTHOR
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckLog;
{
- $SVN::Hooks::CheckLog::VERSION = '1.25';
+ $SVN::Hooks::CheckLog::VERSION = '1.27';
}
# ABSTRACT: Check log messages in commits.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -62,7 +62,7 @@ SVN::Hooks::CheckLog - Check log messages in commits.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckMimeTypes;
{
- $SVN::Hooks::CheckMimeTypes::VERSION = '1.25';
+ $SVN::Hooks::CheckMimeTypes::VERSION = '1.27';
}
# ABSTRACT: Require the svn:mime-type property.
+use strict;
+use warnings;
+
use Carp;
use SVN::Hooks;
@@ -85,7 +85,7 @@ SVN::Hooks::CheckMimeTypes - Require the svn:mime-type property.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckProperty;
{
- $SVN::Hooks::CheckProperty::VERSION = '1.25';
+ $SVN::Hooks::CheckProperty::VERSION = '1.27';
}
# ABSTRACT: Check properties in added files.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -90,7 +90,7 @@ SVN::Hooks::CheckProperty - Check properties in added files.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::CheckStructure;
{
- $SVN::Hooks::CheckStructure::VERSION = '1.25';
+ $SVN::Hooks::CheckStructure::VERSION = '1.27';
}
# ABSTRACT: Check the structure of a repository.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -129,7 +129,7 @@ SVN::Hooks::CheckStructure - Check the structure of a repository.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::DenyChanges;
{
- $SVN::Hooks::DenyChanges::VERSION = '1.25';
+ $SVN::Hooks::DenyChanges::VERSION = '1.27';
}
# ABSTRACT: Deny some changes in a repository.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -117,7 +117,7 @@ SVN::Hooks::DenyChanges - Deny some changes in a repository.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::DenyFilenames;
{
- $SVN::Hooks::DenyFilenames::VERSION = '1.25';
+ $SVN::Hooks::DenyFilenames::VERSION = '1.27';
}
# ABSTRACT: Deny some file names.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -101,7 +101,7 @@ SVN::Hooks::DenyFilenames - Deny some file names.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::Generic;
{
- $SVN::Hooks::Generic::VERSION = '1.25';
+ $SVN::Hooks::Generic::VERSION = '1.27';
}
# ABSTRACT: Implement generic checks for all Subversion hooks.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -34,7 +34,7 @@ sub GENERIC {
}
foreach my $foo (@$functions) {
is_code_ref($foo) or die "$HOOK: hook '$hook' should be mapped to CODE-refs.\n";
- $SVN::Hooks::Hooks{$hook}{$foo} ||= sub { $foo->(@_); };
+ push @{$SVN::Hooks::Hooks{$hook}}, sub { $foo->(@_); };
}
}
@@ -55,7 +55,7 @@ SVN::Hooks::Generic - Implement generic checks for all Subversion hooks.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::JiraAcceptance;
{
- $SVN::Hooks::JiraAcceptance::VERSION = '1.25';
+ $SVN::Hooks::JiraAcceptance::VERSION = '1.27';
}
# ABSTRACT: Integrate Subversion with the JIRA ticketing system.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use SVN::Hooks;
@@ -150,7 +150,7 @@ SVN::Hooks::JiraAcceptance - Integrate Subversion with the JIRA ticketing system
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::Mailer;
{
- $SVN::Hooks::Mailer::VERSION = '1.25';
+ $SVN::Hooks::Mailer::VERSION = '1.27';
}
# ABSTRACT: Send emails after successful commits.
+use strict;
+use warnings;
+
use Carp;
use SVN::Hooks;
@@ -50,7 +50,7 @@ SVN::Hooks::Mailer - Send emails after successful commits.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::Notify;
{
- $SVN::Hooks::Notify::VERSION = '1.25';
+ $SVN::Hooks::Notify::VERSION = '1.27';
}
# ABSTRACT: Subversion activity notification.
+use strict;
+use warnings;
+
use SVN::Hooks;
use Exporter qw/import/;
@@ -63,7 +63,7 @@ SVN::Hooks::Notify - Subversion activity notification.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -1,12 +1,12 @@
-use strict;
-use warnings;
-
package SVN::Hooks::UpdateConfFile;
{
- $SVN::Hooks::UpdateConfFile::VERSION = '1.25';
+ $SVN::Hooks::UpdateConfFile::VERSION = '1.27';
}
# ABSTRACT: Maintain the repository configuration versioned.
+use strict;
+use warnings;
+
use Carp;
use Data::Util qw(:check);
use File::Spec::Functions;
@@ -224,29 +224,30 @@ sub _post_where_to {
} else {
return if $file !~ $from;
# interpolate backreferences
- $to = eval qq{"$to"}; ## no critic
+ $to = eval qq{"$to"}; ## no critic (BuiltinFunctions::ProhibitStringyEval)
}
- my $is_directory = ($to =~ s:/$::);
-
- my $abs_to = abs_path(catfile($absbase, $to));
- if ($is_directory || -d $abs_to) {
- $abs_to = catfile($abs_to, (File::Spec->splitpath($file))[2]);
- }
-
- $absbase eq substr($abs_to, 0, length($absbase))
+ $to !~ m@(?:^|/)\.\.(?:/|$)@
or croak <<"EOS";
$HOOK: post-commit aborted for: $file
This means that $file was committed but the associated
configuration file wasn't generated because its specified
-location ($abs_to)
-isn't below the repository's configuration directory
-($absbase).
+location ($to)
+contains a '..' path component which is not accepted by this hook.
Please, correct the ${HOOK}'s second argument.
EOS
+ my $is_directory = ($to =~ s:/$::);
+
+ $to =~ s:^/+::;
+
+ my $abs_to = catfile($absbase, $to);
+ if ($is_directory || -d $abs_to) {
+ $abs_to = catfile($abs_to, (File::Spec->splitpath($file))[2]);
+ }
+
return $abs_to;
}
@@ -276,7 +277,7 @@ SVN::Hooks::UpdateConfFile - Maintain the repository configuration versioned.
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -305,10 +306,11 @@ FROM can be a string or a qr/Regexp/ specifying the file path relative
to the repository's root (e.g. "trunk/src/version.c" or
"qr:^conf/(\w+).conf$:").
-TO is a path relative to the C</repo/conf> directory in the server. It can be
-an explicit file name or a directory, in which case the basename of FROM is
-used as the name of the destination file. Non-existing directory components of
-TO are automatically created.
+TO must be a relative path indicating where the original file must be copied
+to below the C</repo/conf> directory in the server. It can be an explicit
+file name or a directory, in which case the basename of FROM is used as the
+name of the destination file. Non-existing directory components of TO are
+automatically created.
Note that if the path doesn't exist the hook assumes that it should be a
file. To make sure it's understood as a directory you may end it with a
@@ -1,11 +1,11 @@
-use warnings;
-use strict;
-
package SVN::Hooks;
{
- $SVN::Hooks::VERSION = '1.25';
+ $SVN::Hooks::VERSION = '1.27';
}
-# ABSTRACT: A framework for implementing Subversion hooks.
+# ABSTRACT: Framework for implementing Subversion hooks
+
+use strict;
+use warnings;
use File::Basename;
use File::Spec::Functions;
@@ -35,9 +35,11 @@ sub run_hook {
foreach my $conf (@Conf_Files) {
my $conffile = file_name_is_absolute($conf) ? $conf : catfile($Repo, $conf);
next unless -e $conffile; # Configuration files are optional
+
+ # The configuration file must be evaluated in the main:: namespace
package main;
{
- $main::VERSION = '1.25';
+ $main::VERSION = '1.27';
}
unless (my $return = do $conffile) {
die "couldn't parse '$conffile': $@\n" if $@;
@@ -56,7 +58,7 @@ sub run_hook {
$repo_path = SVN::Look->new($repo_path, '-r' => $args[0]);
}
- foreach my $hook (values %{$Hooks{$hook_name}}) {
+ foreach my $hook (@{$Hooks{$hook_name}}) {
if (is_code_ref($hook)) {
$hook->($repo_path, @args);
} elsif (is_array_ref($hook)) {
@@ -77,63 +79,72 @@ sub run_hook {
sub POST_COMMIT (&) {
my ($hook) = @_;
- $Hooks{'post-commit'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'post-commit'}}, sub { $hook->(@_); };
+ return;
}
# post-lock(repos-path, username)
sub POST_LOCK (&) {
my ($hook) = @_;
- $Hooks{'post-lock'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'post-lock'}}, sub { $hook->(@_); };
+ return;
}
# post-revprop-change(SVN::Look, username, property-name, action)
sub POST_REVPROP_CHANGE (&) {
my ($hook) = @_;
- $Hooks{'post-revprop-change'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'post-revprop-change'}}, sub { $hook->(@_); };
+ return;
}
# post-unlock(repos-path, username)
sub POST_UNLOCK (&) {
my ($hook) = @_;
- $Hooks{'post-unlock'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'post-unlock'}}, sub { $hook->(@_); };
+ return;
}
# pre-commit(SVN::Look)
sub PRE_COMMIT (&) {
my ($hook) = @_;
- $Hooks{'pre-commit'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'pre-commit'}}, sub { $hook->(@_); };
+ return;
}
# pre-lock(repos-path, path, username, comment, steal-lock-flag)
sub PRE_LOCK (&) {
my ($hook) = @_;
- $Hooks{'pre-lock'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'pre-lock'}}, sub { $hook->(@_); };
+ return;
}
# pre-revprop-change(SVN::Look, username, property-name, action)
sub PRE_REVPROP_CHANGE (&) {
my ($hook) = @_;
- $Hooks{'pre-revprop-change'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'pre-revprop-change'}}, sub { $hook->(@_); };
+ return;
}
# pre-unlock(repos-path, path, username, lock-token, break-unlock-flag)
sub PRE_UNLOCK (&) {
my ($hook) = @_;
- $Hooks{'pre-unlock'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'pre-unlock'}}, sub { $hook->(@_); };
+ return;
}
# start-commit(repos-path, username, capabilities)
sub START_COMMIT (&) {
my ($hook) = @_;
- $Hooks{'start-commit'}{$hook} ||= sub { $hook->(@_); };
+ push @{$Hooks{'start-commit'}}, sub { $hook->(@_); };
+ return;
}
## use critic
@@ -148,11 +159,11 @@ __END__
=head1 NAME
-SVN::Hooks - A framework for implementing Subversion hooks.
+SVN::Hooks - Framework for implementing Subversion hooks
=head1 VERSION
-version 1.25
+version 1.27
=head1 SYNOPSIS
@@ -383,7 +394,8 @@ returning anything. Otherwise, they must C<die> with a suitable error
message.
Also note that each hook directive can be called more than once if you
-need to implement more than one specific hook.
+need to implement more than one specific hook. The hooks will run
+in the order they were defined.
=head2 Using Plugins
@@ -1 +0,0 @@
-exclude = ProhibitSubroutinePrototypes
@@ -14,7 +14,7 @@ elsif (not eval {require JIRA::Client}) {
plan skip_all => 'Need JIRA::Client';
}
else {
- plan tests => 15;
+ plan tests => 16;
}
my $t = reset_repo();
@@ -94,6 +94,13 @@ EOS
work_nok('not configured', 'CHECK_JIRA: plugin not configured. Please, use the CHECK_JIRA_CONFIG directive', work(''));
+set_conf(<<'EOS');
+CHECK_JIRA_DISABLE;
+CHECK_JIRA(qr/./);
+EOS
+
+work_ok('disabled', work('no issue'));
+
################################################
# From now on the checks need a JIRA connection.
@@ -8,7 +8,7 @@ use Test::More;
require "test-functions.pl";
if (can_svn()) {
- plan tests => 12;
+ plan tests => 13;
}
else {
plan skip_all => 'Cannot find or use svn commands.';
@@ -134,3 +134,34 @@ work_nok('cry pre-unlock' => qr:\Q$repo\E,/?file.txt,:, <<"EOS");
svn lock $file
svn unlock $file
EOS
+
+set_conf(<<"EOS");
+sub truncate {
+ open FILE, '>', '$file' or die 'Cannot open $file: \$!';
+ close FILE;
+}
+
+sub mark {
+ my (\$mark) = \@_;
+ return sub {
+ open FILE, '>>', '$file' or die \"Cannot open $file: \$!\";
+ print FILE \$mark;
+ close FILE;
+ };
+}
+
+GENERIC('pre-commit' => \\&truncate);
+GENERIC('pre-commit' => mark(1));
+GENERIC('pre-commit' => mark(2));
+GENERIC('pre-commit' => mark(3));
+GENERIC('pre-commit' => mark(4));
+EOS
+
+do_script(newdir(), <<"EOS");
+svn ci -mx $file
+EOS
+
+open FILE, '<', $file or die "Cannot open $file: $!";
+my $marks = <FILE>;
+close FILE;
+ok($marks eq '1234', 'hook order');
@@ -1,20 +0,0 @@
-#!perl
-
-BEGIN {
- unless ($ENV{AUTHOR_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for testing by the author');
- }
-}
-
-
-use strict;
-use warnings;
-
-use Test::More;
-use English qw(-no_match_vars);
-
-eval "use Test::Perl::Critic";
-plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
-Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
-all_critic_ok();
@@ -7,6 +7,7 @@ BEGIN {
}
}
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
use Test::More;
@@ -7,6 +7,7 @@ BEGIN {
}
}
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
eval "use Test::Pod 1.41";
@@ -1,5 +1,3 @@
-# Copyright (C) 2008 by CPqD
-
use strict;
use warnings;
use Cwd;
@@ -1,6 +1,5 @@
[PerlCritic]
select = lib/**/*.pm
-argv = --verbose 10
[PodChecker]
select = lib/**/*.pm, TODO.pod