[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Proposed minor fix to commit-email.pl.in

From: Neil Steiner <neil.steiner_at_vt.edu>
Date: 2004-03-20 18:26:46 CET

Hello,

Although I've joined the project, I see that I don't have commit accesss
to the repository, and instead of trying to request that, perhaps I can
just pass a long a fix that worked for me. I believe this would rate as
P3 or lower.

When I set up my Subversion repository to send post-commit emails
through commit-email.pl, I found unsightly behavior in the case of
multiple recipients. The relevant line of my post-commit hook looks
like this:

/project/JHDLBits/svn/JHDLBits/hooks/commit-email.pl \
         --from noreply@ccm.ece.vt.edu \
         -r jbits@listserv.vt.edu \
         -s "JHDLBits Change Notice: " \
         "$REPOS" "$REV" \
         jehunte3@vt.edu \
         apoetter@vt.edu \
         ikek70@vt.edu \
         jedmison@vt.edu \
         maparks@vt.edu \
         athanas@vt.edu \
         neil.steiner@vt.edu

What shows up in the email "To:" headers is:

jehunte3%vt.edu.apoetter%vt.edu.ikek70%vt.edu.jedmison%vt.edu.maparks@vt.edu.neil.steiner

Let me emphasize that while the header looks wrong, the email is
correctly sent to each of the recipients.

The script joins the recipients with a space as a delimiter, which is
what it needs to pass along to sendmail. But it also uses that same
string in the email header, where I believe it should use commas as
delimiters.

I suggest changing svn/tools/hook-scripts/commit-email.pl.in line 414
(revision 9168) from

     push(@head, "To: $userlist\n");

to

     my $header_userlist;
     ($header_userlist = $userlist) =~ s/ /, /g;
     push(@head, "To: $header_userlist\n");

For your information, I'm using Linux 2.6.3-1-686 with Exim 3.36.

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 22 00:45:07 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.