r44715 - in /branches/upstream/libsvn-hooks-perl/current: ./ lib/SVN/ lib/SVN/Hooks/ t/

angelabad-guest at users.alioth.debian.org angelabad-guest at users.alioth.debian.org
Thu Sep 24 08:33:28 UTC 2009


Author: angelabad-guest
Date: Thu Sep 24 08:33:18 2009
New Revision: 44715

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44715
Log:
[svn-upgrade] Integrating new upstream version, libsvn-hooks-perl (0.22)

Added:
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckCapability.pm
    branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t   (with props)
Modified:
    branches/upstream/libsvn-hooks-perl/current/Changes
    branches/upstream/libsvn-hooks-perl/current/MANIFEST
    branches/upstream/libsvn-hooks-perl/current/META.yml
    branches/upstream/libsvn-hooks-perl/current/README
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowLogChange.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowPropChange.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckJira.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckLog.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckMimeTypes.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckProperty.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckStructure.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyChanges.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyFilenames.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/JiraAcceptance.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Mailer.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Notify.pm
    branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/UpdateConfFile.pm
    branches/upstream/libsvn-hooks-perl/current/t/pod-coverage.t

Modified: branches/upstream/libsvn-hooks-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/Changes?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/Changes (original)
+++ branches/upstream/libsvn-hooks-perl/current/Changes Thu Sep 24 08:33:18 2009
@@ -1,4 +1,8 @@
 Revision history for SVN-Hooks. -*- text -*-
+
+0.22	2009-09-23
+
+	New hook: CheckCapability.
 
 0.21	2009-08-19
 

Modified: branches/upstream/libsvn-hooks-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/MANIFEST?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/MANIFEST (original)
+++ branches/upstream/libsvn-hooks-perl/current/MANIFEST Thu Sep 24 08:33:18 2009
@@ -3,6 +3,7 @@
 lib/SVN/Hooks.pm
 lib/SVN/Hooks/AllowLogChange.pm
 lib/SVN/Hooks/AllowPropChange.pm
+lib/SVN/Hooks/CheckCapability.pm
 lib/SVN/Hooks/CheckJira.pm
 lib/SVN/Hooks/CheckLog.pm
 lib/SVN/Hooks/CheckMimeTypes.pm
@@ -21,6 +22,7 @@
 t/00-load.t
 t/02-allowlogchange.t
 t/02-allowpropchange.t
+t/02-checkcapability.t
 t/02-checkjira.t
 t/02-checklog.t
 t/02-checkmimetypes.t

Modified: branches/upstream/libsvn-hooks-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/META.yml?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/META.yml (original)
+++ branches/upstream/libsvn-hooks-perl/current/META.yml Thu Sep 24 08:33:18 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                SVN-Hooks
-version:             0.21
+version:             0.22
 abstract:            A framework for implementing Subversion hooks.
 license:             ~
 author:              

Modified: branches/upstream/libsvn-hooks-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/README?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/README (original)
+++ branches/upstream/libsvn-hooks-perl/current/README Thu Sep 24 08:33:18 2009
@@ -1,6 +1,6 @@
 Name:    SVN-Hooks
 What:    Framework for Subversion hooks
-Version: 0.21
+Version: 0.22
 Author:  Gustavo Chaves <gnustavo at cpan.org>
 
 SVN-Hooks is a framework for creating Subversion hooks

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks.pm Thu Sep 24 08:33:18 2009
@@ -15,11 +15,11 @@
 
 =head1 VERSION
 
-Version 0.21
+Version 0.22
 
 =cut
 
-our $VERSION = '0.21';
+our $VERSION = '0.22';
 
 =head1 SYNOPSIS
 
@@ -140,6 +140,10 @@
 
 Allow changes in revision properties.
 
+=item SVN::Hooks::CheckCapability
+
+Check if the Subversion client implements the required capabilities.
+
 =item SVN::Hooks::CheckJira
 
 Integrate Subversion with the
@@ -203,6 +207,7 @@
 	use warnings;
 	use SVN::Hooks;
 	use SVN::Hooks::AllowPropChange;
+	use SVN::Hooks::CheckCapability;
 	use SVN::Hooks::CheckJira;
 	use SVN::Hooks::CheckLog;
 	use SVN::Hooks::CheckMimeTypes;
@@ -219,6 +224,7 @@
 This script will serve for any hook. Create symbolic links pointing to
 it for each hook you are interested in.
 
+	$ ln -s svn-hooks.pl start-commit
 	$ ln -s svn-hooks.pl pre-commit
 	$ ln -s svn-hooks.pl post-commit
 	$ ln -s svn-hooks.pl pre-revprop-change
@@ -233,6 +239,8 @@
 	$ cat svn-hooks.conf
 	DENY_FILENAMES(qr:[^-/\.\w]:i);
 
+        CHECK_CAPABILITY('mergeinfo');
+
 	CHECK_MIMETYPES();
 
 	# Binary+editable files must have the svn:needs-lock property set
@@ -277,7 +285,7 @@
 
 =over
 
-=item * start-commit repo-path user
+=item * start-commit repo-path user capabilities
 
 =item * pre-commit repo-path txn
 

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowLogChange.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowLogChange.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowLogChange.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowLogChange.pm Thu Sep 24 08:33:18 2009
@@ -67,6 +67,8 @@
     }
 
     $conf->{'pre-revprop-change'} = \&pre_revprop_change;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowPropChange.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowPropChange.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowPropChange.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/AllowPropChange.pm Thu Sep 24 08:33:18 2009
@@ -88,6 +88,8 @@
     my $prop = shift @whos;
     push @{$conf->{specs}}, [$prop => \@whos];
     $conf->{'pre-revprop-change'} = \&pre_revprop_change;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Added: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckCapability.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckCapability.pm?rev=44715&op=file
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckCapability.pm (added)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckCapability.pm Thu Sep 24 08:33:18 2009
@@ -1,0 +1,123 @@
+package SVN::Hooks::CheckCapability;
+
+use warnings;
+use strict;
+use SVN::Hooks;
+
+use Exporter qw/import/;
+my $HOOK = 'CHECK_CAPABILITY';
+our @EXPORT = ($HOOK);
+
+our $VERSION = $SVN::Hooks::VERSION;
+
+=head1 NAME
+
+SVN::Hooks::CheckCapability - Check the svn client capabilities.
+
+=head1 SYNOPSIS
+
+This SVN::Hooks plugin checks if the Subversion client implements the
+required capabilities.
+
+It's active in the C<start-commit> hook.
+
+It's configured by the following directive.
+
+=head2 CHECK_CAPABILITY(CAPABILITY...)
+
+This directive enables the checking, causing the commit to abort if it
+doesn't comply.
+
+The arguments are a list of capability names. Every capability
+specified must be supported by the client in order to the hook to
+succeed.
+
+Example:
+
+	CHECK_CAPABILITY('mergeinfo');
+
+=cut
+
+sub CHECK_CAPABILITY {
+    my @capabilities = @_;
+
+    my $conf = $SVN::Hooks::Confs->{$HOOK};
+    $conf->{capabilities} = \@capabilities;
+    $conf->{'start-commit'} = \&start_commit;
+    1;
+}
+
+$SVN::Hooks::Inits{$HOOK} = sub {
+    return { capabilities => [] };
+};
+
+sub start_commit {
+    my ($self, $user, $capabilities) = @_;
+
+    $capabilities ||= ''; # pre 1.5 svn clients don't pass the capabilities
+
+    # Create a hash to facilitate the checks
+    my %supported;
+    @supported{split /:/, $capabilities} = undef;
+
+    # Grok which required capabilities are missing
+    my @missing = grep {! exists $supported{$_}} @{$self->{capabilities}};
+
+    if (@missing) {
+	die "$HOOK: Your subversion client does not support the following capabilities:\n\n\t",
+	    join(', ', @missing),
+	    "\n\nPlease, consider upgrading to a newer version of your client.\n";
+    }
+}
+
+=head1 AUTHOR
+
+Gustavo Chaves, C<< <gnustavo at cpan.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-svn-hooks-checkproperty at rt.cpan.org>, or through the web
+interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SVN-Hooks>.  I will
+be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+    perldoc SVN::Hooks
+
+You can also look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=SVN-Hooks>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/SVN-Hooks>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/SVN-Hooks>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/SVN-Hooks>
+
+=back
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2008-2009 CPqD, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1; # End of SVN::Hooks::CheckCapability

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckJira.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckJira.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckJira.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckJira.pm Thu Sep 24 08:33:18 2009
@@ -73,6 +73,8 @@
 	conf  => [$baseURL, $login, $passwd],
 	match => $match,
     };
+
+    1;
 }
 
 =head2 CHECK_JIRA(REGEXP => {OPT => VALUE, ...})

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckLog.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckLog.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckLog.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckLog.pm Thu Sep 24 08:33:18 2009
@@ -51,6 +51,8 @@
 	error  => $error_message,
     };
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckMimeTypes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckMimeTypes.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckMimeTypes.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckMimeTypes.pm Thu Sep 24 08:33:18 2009
@@ -47,6 +47,7 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     $conf->{help} = $help;
     $conf->{'pre-commit'} = \&pre_commit;
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckProperty.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckProperty.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckProperty.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckProperty.pm Thu Sep 24 08:33:18 2009
@@ -77,6 +77,8 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     push @{$conf->{checks}}, [$where, $prop => $what];
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckStructure.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckStructure.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckStructure.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/CheckStructure.pm Thu Sep 24 08:33:18 2009
@@ -134,6 +134,8 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     $conf->{structure} = $structure;
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyChanges.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyChanges.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyChanges.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyChanges.pm Thu Sep 24 08:33:18 2009
@@ -58,6 +58,8 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     push @{$conf->{$change}}, @regexes;
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 sub DENY_ADDITION {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyFilenames.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyFilenames.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyFilenames.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/DenyFilenames.pm Thu Sep 24 08:33:18 2009
@@ -41,6 +41,8 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     $conf->{checks} = \@regexes;
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/JiraAcceptance.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/JiraAcceptance.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/JiraAcceptance.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/JiraAcceptance.pm Thu Sep 24 08:33:18 2009
@@ -56,6 +56,8 @@
 	login    => $login,
 	password => $password,
     };
+
+    1;
 }
 
 =head2 JIRA_LOG_MATCH(REGEXP, MESSAGE)
@@ -93,6 +95,8 @@
 $message
 EOS
     }
+
+    1;
 }
 
 =head2 JIRA_ACCEPTANCE(REGEXP, PROJECT_KEYS)
@@ -127,6 +131,8 @@
     }
     push @{$conf->{checks}}, [$regex => \%keys];
     $conf->{'pre-commit'} = \&pre_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Mailer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Mailer.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Mailer.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Mailer.pm Thu Sep 24 08:33:18 2009
@@ -78,6 +78,8 @@
     else {
 	die "EMAIL_CONFIG: unknown option '$opt'"
     }
+
+    1;
 }
 
 my %valid_options = (
@@ -184,6 +186,8 @@
     push @{$conf->{projects}}, \%o;
 
     $conf->{'post-commit'} = \&post_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Notify.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Notify.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Notify.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/Notify.pm Thu Sep 24 08:33:18 2009
@@ -48,6 +48,8 @@
     my %opt_defaults = @_;
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     $conf->{defaults} = \%opt_defaults;
+
+    1;
 }
 
 =head2 NOTIFY(%HASH)
@@ -80,6 +82,8 @@
     my $conf = $SVN::Hooks::Confs->{$HOOK};
     $conf->{opts} = \%opts;
     $conf->{'post-commit'} = \&post_commit;
+
+    1;
 };
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Modified: branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/UpdateConfFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/UpdateConfFile.pm?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/UpdateConfFile.pm (original)
+++ branches/upstream/libsvn-hooks-perl/current/lib/SVN/Hooks/UpdateConfFile.pm Thu Sep 24 08:33:18 2009
@@ -184,6 +184,8 @@
 	or die "$HOOK: invalid function names: ", join(', ', sort keys %args), ".\n";
 
     $conf->{'post-commit'} = \&post_commit;
+
+    1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {

Added: branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t?rev=44715&op=file
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t (added)
+++ branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t Thu Sep 24 08:33:18 2009
@@ -1,0 +1,57 @@
+# -*- cperl -*-
+
+use strict;
+use warnings;
+use lib 't';
+use Test::More;
+
+require "test-functions.pl";
+
+if (has_svn()) {
+    plan tests => 3;
+}
+else {
+    plan skip_all => 'Need svn commands in the PATH.';
+}
+
+my $t = reset_repo();
+
+set_hook(<<'EOS');
+use SVN::Hooks::CheckCapability;
+EOS
+
+set_conf(<<'EOS');
+CHECK_CAPABILITY();
+EOS
+
+work_ok('setup', <<"EOS");
+touch $t/wc/f
+svn add -q --no-auto-props $t/wc/f
+svn ci -mx $t/wc/f
+EOS
+
+set_conf(<<'EOS');
+CHECK_CAPABILITY('nonexistent-capability');
+EOS
+
+work_nok('conf: nonexistent capability', 'CHECK_CAPABILITY: Your subversion client does not support', <<"EOS");
+echo asdf >>$t/wc/f
+svn ci -mx $t/wc/f
+EOS
+
+set_conf(<<'EOS');
+CHECK_CAPABILITY('mergeinfo');
+EOS
+
+if (`svn help` =~ /\bmergeinfo\b/) {
+    work_ok('has mergeinfo', <<"EOS");
+echo asdf >>$t/wc/f
+svn ci -mx $t/wc/f
+EOS
+}
+else {
+    work_nok('do not has mergeinfo', 'CHECK_CAPABILITY: Your subversion client does not support', <<"EOS");
+echo asdf >>$t/wc/f
+svn ci -mx $t/wc/f
+EOS
+}

Propchange: branches/upstream/libsvn-hooks-perl/current/t/02-checkcapability.t
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/upstream/libsvn-hooks-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsvn-hooks-perl/current/t/pod-coverage.t?rev=44715&op=diff
==============================================================================
--- branches/upstream/libsvn-hooks-perl/current/t/pod-coverage.t (original)
+++ branches/upstream/libsvn-hooks-perl/current/t/pod-coverage.t Thu Sep 24 08:33:18 2009
@@ -20,5 +20,5 @@
     if $@;
 
 all_pod_coverage_ok(
-    {also_private => [qr/^(?:pre|post)_/]}
+    {also_private => [qr/^(?:pre|post|start)_/]}
 );




More information about the Pkg-perl-cvs-commits mailing list