Skip Menu |

This queue is for tickets about the SVN-Notify-Filter-Watchers CPAN distribution.

Report information
The Basics
Id: 53205
Status: resolved
Priority: 0/
Queue: SVN-Notify-Filter-Watchers

People
Owner: LARRYSH [...] cpan.com
Requestors: ingo [...] ingoschmiegel.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Ingo Schmiegel <ingo [...] ingoschmiegel.de>
Subject: Bug: Watcher property not found on root of svn repos
Date: Tue, 29 Dec 2009 11:37:38 +0100
To: bug-SVN-Notify-Filter-Watchers [...] rt.cpan.org
From: Ingo Schmiegel <ingo [...] ingoschmiegel.de>
Hello Larry, first of all thanks for writing this module. I like it very much and also use it as inspiration & reference for my own filters. There's a small problem with having e.g. an svnx:watchers property set on the root of the repos. After adding debug prints to SVN::Notify::Filter::Watchers::_parent I found the problem is that the root of the repos is never checked. E.g. if a change is in svnadmin/hooks, then _parent returns "svnadmin", and then again "svnadmin" which causes the calling functions to stop iterating. The svnlook command on unix can deal with any of: svnlook proplist myrepos / svnlook proplist myrepos . svnlook proplist myrepos '' to check the root of the repos. So I've changed the _parent slightly to cover this: sub _parent { my $file = shift; $file =~ m/^(.*)\//; if (defined($1) && length($1)) { return $1; } else { return '/'; } } The patch is: --- perl/5.10.0-threads/site_lib/SVN/Notify/Filter/Watchers.pm (revision 81) +++ perl/5.10.0-threads/site_lib/SVN/Notify/Filter/Watchers.pm (working copy) @@ -158,11 +158,11 @@ sub _parent { my $file = shift; - $file =~ m/^(.*)\/.*$/; - if (defined($1)) { + $file =~ m/^(.*)\//; + if (defined($1) && length($1)) { return $1; } else { - return $file; + return '/'; } } I have not tested this on windows nor cygwin. Would be appreciated if this could somehow find its way into your next release. Thanks again, best regards, and have a successful year 2010! Ingo
Thanks for the patch.