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

Re: [PATCH] fix for mail header bug in commit-email.pl

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-08-16 23:25:09 CEST

On 8/15/07, Gustavo Delfino <gdelfino@umich.edu> wrote:
> [[[
> * trunk/tools/hook-scripts/commit-email.pl.in: Bug Fix
>
> My notification emails are being sent with an incorrect "From" header.
>
> Considering that in line 208 we have:
>
> elsif ($arg eq '--stdout')
> {
> $current_project->{stdout} = 1;
> }
>
> And in line 715 we have:
>
> sub new_project
> {
> return {email_addresses => [],
> from_address => '',
> hostname => '',
> log_file => '',
> match_regex => '.',
> reply_to => '',
> subject_prefix => '',
> show_diff => 1,
> stdout => 0};
> }
>
> And that "defined $stdout" is true when $stdout is equal to number 0
>
> Then I propose this change in commit-email.pl:
>
> John Peacock, who I understand wrote the original script encouraged
> me to submit this patch.
>
> Patch by: Gustavo Delfino <gdelfino@umich.edu>
> Review by: John Peacock <jpeacock@rowman.com>
> ]]]
> @@ -547,7 +547,7 @@
>
> my @head;
> my $formatted_date;
> - if (defined $stdout)
> + if (defined $stdout && $stdout == 1)
> {
> $formatted_date = strftime('%a %b %e %X %Y', localtime());
> push(@head, "From $mail_from $formatted_date\n");

Hi Gustavo. You probably want to send the whole output of "svn diff",
which includes header lines saying which files changed.

I'm not too familiar with this particular script but I would just do
"if ($stdout)" (which is done later in the function anyway).

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 16 23:22:55 2007

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