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

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

From: Gustavo Delfino <gdelfino_at_umich.edu>
Date: 2007-08-16 00:22:01 CEST

[[[
* 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");

  • application/pkcs7-signature attachment: smime.p7s
Received on Thu Aug 16 22:40:33 2007

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.