Subject: | --subject-prefix feature request |
Date: | Wed, 10 Jan 2007 15:06:19 -0500 |
To: | <bug-SVN-Notify [...] rt.cpan.org> |
From: | "Jerry Veldhuis" <jerry [...] invidi.com> |
Our development team are big fans of SVN::Notify.
It would be more flexible if the --subject-prefix option was changed to
optional control the location of the [<revision>] information in the
subject line.
Here is a suggested code changes if that helps. (against v2.64)
--- Notify.pm 2007-01-10 13:03:16.000000000 -0700
+++ Notify.pm.orig 2007-01-10 13:00:22.000000000 -0700
@@ -353,9 +353,7 @@
svnnotify -P (Our-Developers)
An optional string to prepend to the beginning of the subject line of
the
-notification email, which should be a C<sprintf> format using "%d" to
place
-svn revision number. For backward compatibility, if no %d appears in
the string,
-then '[%d ]' is appended to the prefix before use.
+notification email.
=item subject_cx
@@ -1053,17 +1051,9 @@
$self->_dbpnt( "Preparing subject") if $self->{verbose};
# Start with the optional message and revision number..
- if ( defined $self->{subject_prefix} ) {
- if ( index($self->{subject_prefix}, '%d') > 0 ) {
- $self->{subject}.=sprintf($self->{subject_prefix},
$self->{revision});
- }
- else {
-
$self->{subject}.=$self->{subject_prefix}."[$self->{revision}] ";
- }
- }
- else {
- $self->{subject} .= "[$self->{revision}] ";
- }
+ $self->{subject} .=
+ (defined $self->{subject_prefix} ? "$self->{subject_prefix} " :
'')
+ . "[$self->{revision}] ";
# Add the context if there is one.
if ($self->{cx}) {
- - - - - - - Appended by Invidi Technologies Corporation. - - - - - - -
DISCLAIMER:
This email message is for the sole use of the intended recipients and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited.