theory / svn-notify

Subversion activity notification
http://search.cpan.org/dist/SVN-Notify/
18 stars 18 forks source link

allow to match against filename in --to-regexp-map, and a fix for pod-spelling #1

Closed mscherer closed 11 years ago

mscherer commented 13 years ago

Hi, while working on https://bugs.mageia.org/show_bug.cgi?id=1095 , I found out that SVN::Notify would only match against directory name, and not against filename. So here is a patch to enable this behavior.

To test, I created a small svn in /tmp/svn/foo, with a file coin/foo.pot, and triggered svnnotify with that :

PERL5LIB=$(pwd)/lib bin/svnnotify --repos-path /tmp/svn/foo/ --revision 2 --to-regex-map "misc@example.org=.pot$"

Without the patch, it does nothing, with the patch, it send a email. I ran the tests, nothing fail, and tested if the regular functionnality was still ok, and it worked. I also quickly fixed the pod and comments.

There is also a fix for pod-spelling, that is saying that GitHub is a spelling error.

gnustavo commented 12 years ago

I just stumbled upon this issue. It took me a while to figure out why a regexp ending in a slash wasn't working when I committed a file in that directory. Taking off the ending slash made it work. Later I reread the documentation and paid attention to the "directories affected" part. :-(

Also, a developer asked me to setup a hook to notify him whenever a file called "pom.xml" was committed... it can't be done as it is.

It would be very nice if this patch could be merged in a future release.

Thanks!

theory commented 11 years ago

Merged, sorry I missed this for two years! Will put out a new release soon.