r54031 - in /trunk/libsvn-hooks-perl: Changes META.yml README debian/README.source debian/changelog debian/control debian/copyright debian/rules debian/source/ debian/source/format lib/SVN/Hooks.pm lib/SVN/Hooks/DenyChanges.pm t/02-denychanges.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Mar 10 02:02:37 UTC 2010


Author: jawnsy-guest
Date: Wed Mar 10 02:02:27 2010
New Revision: 54031

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54031
Log:
* New upstream release
* Standards-Version 3.8.4 (no changes)
* Add myself to Uploaders and Copyright
* Rewrite control description
* Use new 3.0 (quilt) source format

Added:
    trunk/libsvn-hooks-perl/debian/source/
    trunk/libsvn-hooks-perl/debian/source/format
Removed:
    trunk/libsvn-hooks-perl/debian/README.source
Modified:
    trunk/libsvn-hooks-perl/Changes
    trunk/libsvn-hooks-perl/META.yml
    trunk/libsvn-hooks-perl/README
    trunk/libsvn-hooks-perl/debian/changelog
    trunk/libsvn-hooks-perl/debian/control
    trunk/libsvn-hooks-perl/debian/copyright
    trunk/libsvn-hooks-perl/debian/rules
    trunk/libsvn-hooks-perl/lib/SVN/Hooks.pm
    trunk/libsvn-hooks-perl/lib/SVN/Hooks/DenyChanges.pm
    trunk/libsvn-hooks-perl/t/02-denychanges.t

Modified: trunk/libsvn-hooks-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/Changes?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/Changes (original)
+++ trunk/libsvn-hooks-perl/Changes Wed Mar 10 02:02:27 2010
@@ -1,6 +1,10 @@
 Revision history for SVN-Hooks. -*- text -*-
 
-0.24    2010-01-19
+0.26    2010-03-08
+
+	Implements the DENY_EXEMP_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

Modified: trunk/libsvn-hooks-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/META.yml?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/META.yml (original)
+++ trunk/libsvn-hooks-perl/META.yml Wed Mar 10 02:02:27 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                SVN-Hooks
-version:             0.25
+version:             0.26
 abstract:            A framework for implementing Subversion hooks.
 license:             ~
 author:              

Modified: trunk/libsvn-hooks-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/README?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/README (original)
+++ trunk/libsvn-hooks-perl/README Wed Mar 10 02:02:27 2010
@@ -1,6 +1,6 @@
 Name:    SVN-Hooks
 What:    Framework for Subversion hooks
-Version: 0.25
+Version: 0.26
 Author:  Gustavo Chaves <gnustavo at cpan.org>
 
 SVN-Hooks is a framework for creating Subversion hooks

Modified: trunk/libsvn-hooks-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/debian/changelog?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/debian/changelog (original)
+++ trunk/libsvn-hooks-perl/debian/changelog Wed Mar 10 02:02:27 2010
@@ -1,3 +1,13 @@
+libsvn-hooks-perl (0.26-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Standards-Version 3.8.4 (no changes)
+  * Add myself to Uploaders and Copyright
+  * Rewrite control description
+  * Use new 3.0 (quilt) source format
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Tue, 09 Mar 2010 21:25:38 -0500
+
 libsvn-hooks-perl (0.25-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libsvn-hooks-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/debian/control?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/debian/control (original)
+++ trunk/libsvn-hooks-perl/debian/control Wed Mar 10 02:02:27 2010
@@ -1,30 +1,27 @@
 Source: libsvn-hooks-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
-Build-Depends-Indep: libemail-send-perl,
+Build-Depends: debhelper (>= 7.0.50)
+Build-Depends-Indep: perl, subversion, libemail-send-perl,
  libemail-simple-perl (>= 2.100) | libemail-simple-creator-perl,
  libjira-client-perl, libsoap-lite-perl, libsvn-look-perl, libsvn-notify-perl,
- libtest-kwalitee-perl, libtest-pod-coverage-perl, libtest-pod-perl,
- perl, subversion
+ libtest-kwalitee-perl, libtest-pod-coverage-perl, libtest-pod-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Angel Abad <angelabad at gmail.com>,
+Uploaders: Angel Abad <angelabad at gmail.com>, Jonathan Yu <jawnsy at cpan.org>,
  gregor herrmann <gregoa at debian.org>,
  Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
 Homepage: http://search.cpan.org/dist/SVN-Hooks/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsvn-hooks-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsvn-hooks-perl/
 
 Package: libsvn-hooks-perl
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, libemail-send-perl,
+Depends: ${misc:Depends}, ${perl:Depends}, subversion, libemail-send-perl,
  libemail-simple-perl (>= 2.100) | libemail-simple-creator-perl,
- libjira-client-perl, libsoap-lite-perl, libsvn-look-perl, libsvn-notify-perl,
- subversion
-Description: framework for implementing subversion hooks
- SVN::Hooks is a framework for creating 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 available.
- But as a framework, it can be extended to implement all types of
- hooks. It's also very fast.
+ libjira-client-perl, libsoap-lite-perl, libsvn-look-perl, libsvn-notify-perl
+Description: framework for implementing Subversion hooks
+ SVN::Hooks is a Perl-based framework for creating Subversion hooks. It comes
+ with several plugins that implement some of the most commonly used standalone
+ Subversion hooks available. As a framework, it can be extended to implement
+ all types of hooks.

Modified: trunk/libsvn-hooks-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/debian/copyright?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/debian/copyright (original)
+++ trunk/libsvn-hooks-perl/debian/copyright Wed Mar 10 02:02:27 2010
@@ -8,8 +8,8 @@
 License: Artistic or GPL+1
 
 Files: debian/*
-Copyright: 2009, 2010, Angel Abad <angelabad at gmail.com>
- 2009, Angel Abad (Ikusnet SLL) <angel at grupoikusnet.com>
+Copyright: 2010, Jonathan Yu <jawnsy at cpan.org>
+ 2009-2010, Angel Abad <angelabad at gmail.com>
  2009, Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
  2009, gregor herrmann <gregoa at debian.org>
 License: Artistic or GPL-1+

Modified: trunk/libsvn-hooks-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/debian/rules?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/debian/rules (original)
+++ trunk/libsvn-hooks-perl/debian/rules Wed Mar 10 02:02:27 2010
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@ --with quilt
+	dh $@
 
 override_dh_auto_configure:
 	dh_auto_configure -- --author-tests

Added: trunk/libsvn-hooks-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/debian/source/format?rev=54031&op=file
==============================================================================
--- trunk/libsvn-hooks-perl/debian/source/format (added)
+++ trunk/libsvn-hooks-perl/debian/source/format Wed Mar 10 02:02:27 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libsvn-hooks-perl/lib/SVN/Hooks.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/lib/SVN/Hooks.pm?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/lib/SVN/Hooks.pm (original)
+++ trunk/libsvn-hooks-perl/lib/SVN/Hooks.pm Wed Mar 10 02:02:27 2010
@@ -15,11 +15,11 @@
 
 =head1 VERSION
 
-Version 0.25
+Version 0.26
 
 =cut
 
-our $VERSION = '0.25';
+our $VERSION = '0.26';
 
 =head1 SYNOPSIS
 

Modified: trunk/libsvn-hooks-perl/lib/SVN/Hooks/DenyChanges.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/lib/SVN/Hooks/DenyChanges.pm?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/lib/SVN/Hooks/DenyChanges.pm (original)
+++ trunk/libsvn-hooks-perl/lib/SVN/Hooks/DenyChanges.pm Wed Mar 10 02:02:27 2010
@@ -7,7 +7,7 @@
 
 use Exporter qw/import/;
 my $HOOK = 'DENY_CHANGES';
-my @HOOKS = ('DENY_ADDITION', 'DENY_DELETION', 'DENY_UPDATE');
+my @HOOKS = ('DENY_ADDITION', 'DENY_DELETION', 'DENY_UPDATE', 'DENY_EXEMPT_USERS');
 our @EXPORT = @HOOKS;
 
 our $VERSION = $SVN::Hooks::VERSION;
@@ -45,6 +45,15 @@
 passed as arguments.
 
 	DENY_UPDATE(qr/^tags/); # Can't modify tags
+
+=head2 DENY_EXCEMPT_USERS(LIST)
+
+This directive receives a list of user names which are to be exempt
+from the rules specified by the other directives.
+
+	DENY_EXEMPT_USERS(qw/john mary/);
+
+This rule exempts users C<john> and C<mary> from the other deny rules.
 
 =cut
 
@@ -65,33 +74,49 @@
 
 sub DENY_ADDITION {
     my @args = @_;
-    return _deny_change(deny_add    => @args);
+    return _deny_change(add    => @args);
 }
 
 sub DENY_DELETION {
     my @args = @_;
-    return _deny_change(deny_delete => @args);
+    return _deny_change(delete => @args);
 }
 
 sub DENY_UPDATE {
     my @args = @_;
-    return _deny_change(deny_update => @args);
+    return _deny_change(update => @args);
+}
+
+sub DENY_EXEMPT_USERS {
+    my @users = @_;
+    my $conf = $SVN::Hooks::Confs->{$HOOK};
+    foreach my $user (@users) {
+	croak "DENY_EXEMPT_USERS: all arguments must be strings\n"
+	    if ref $user;
+	$conf->{exempt}{$user} = undef;
+    }
+
+    return 1;
 }
 
 $SVN::Hooks::Inits{$HOOK} = sub {
     return {
-	deny_add    => [],
-	deny_delete => [],
-	deny_update => [],
+	add    => [],
+	delete => [],
+	update => [],
+	exempt => {},
     };
 };
 
 sub pre_commit {
     my ($self, $svnlook) = @_;
 
+    # Exempt users
+    return if %{$self->{exempt}} && exists $self->{exempt}{$svnlook->author()};
+
     my @errors;
 
-    foreach my $regex (@{$self->{deny_add}}) {
+    foreach my $regex (@{$self->{add}}) {
       ADDED:
 	foreach my $file ($svnlook->added()) {
 	    if ($file =~ $regex) {
@@ -101,7 +126,7 @@
 	}
     }
 
-    foreach my $regex (@{$self->{deny_delete}}) {
+    foreach my $regex (@{$self->{delete}}) {
       DELETED:
 	foreach my $file ($svnlook->deleted()) {
 	    if ($file =~ $regex) {
@@ -111,7 +136,7 @@
 	}
     }
 
-    foreach my $regex (@{$self->{deny_update}}) {
+    foreach my $regex (@{$self->{update}}) {
       UPDATED:
 	foreach my $file ($svnlook->updated()) {
 	    if ($file =~ $regex) {

Modified: trunk/libsvn-hooks-perl/t/02-denychanges.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-hooks-perl/t/02-denychanges.t?rev=54031&op=diff
==============================================================================
--- trunk/libsvn-hooks-perl/t/02-denychanges.t (original)
+++ trunk/libsvn-hooks-perl/t/02-denychanges.t Wed Mar 10 02:02:27 2010
@@ -8,7 +8,7 @@
 require "test-functions.pl";
 
 if (has_svn()) {
-    plan tests => 8;
+    plan tests => 10;
 }
 else {
     plan skip_all => 'Need svn commands in the PATH.';
@@ -74,3 +74,25 @@
 svn ci -mx $t/wc/f
 EOS
 
+# Grok the author name
+my $author;
+open my $svn, '-|', "svn info $t/wc/del"
+    or die "Can't exec svn info\n";
+while (<$svn>) {
+    if (/Author: (.*)$/) {
+	$author = $1;
+    }
+}
+close $svn;
+ok(defined $author, 'grok author');
+
+set_conf(<<"EOS");
+DENY_ADDITION(qr/add/);
+DENY_EXEMPT_USERS($author);
+EOS
+
+work_ok('exempt user', <<"EOS");
+touch $t/wc/add
+svn add -q --no-auto-props $t/wc/add
+svn ci -mx $t/wc/add
+EOS




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