From: Michael Cook <michael.cook@cisco.com>
Subject: Re: Patches for cvs and cvslog
Date: Thu, 03 Jan 2002 11:56:28 -0500 [thread overview]
Message-ID: <g08pu4r4blv.fsf@zzz.cisco.com> (raw)
In-Reply-To: <m3advvs8lo.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Thu, 03 Jan 2002 17:27:31 +0100")
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> I've included the patch below, but remember: I don't know any Perl, so
> try not to hurt yourself too badly when you fall off your chair,
> laughing. :-)
it looks pretty reasonable. you probably want to close PASSWD. and
a couple other performance tweaks would be easy if you're inclined:
}
$data{messages} = [ $data{message} ] unless $data{messages};
my $from_line = "";
if (open (PASSWD, "/usr/local/cvsroot/CVSROOT/passwd")) {
my $passwd_user = $ENV{CVSUSER};
- my $full_name = "CVS";
- my $email_address = "cvs\@" . `hostname --fqdn`;
- chomp $email_address;
+ my $full_name;
+ my $email_address;
my $line;
my @info;
while ($line = <PASSWD>) {
chomp $line;
@info = split (/:/, $line);
if ($info[0] eq $passwd_user) {
$full_name = $info[3];
$email_address = $info[4];
+ last;
}
+ }
+ close PASSWD;
+ unless (defined $full_name)
+ {
+ $full_name = "CVS";
+ $email_address = "cvs\@" . `hostname --fqdn`;
+ chomp $email_address;
}
$from_line = "From: \"$full_name\" <$email_address>\n";
}
# Open our mail program.
open (MAIL, '| /usr/lib/sendmail -t -oi -oem')
or die "$0: can't fork /usr/lib/sendmail: $!\n";
m.
next prev parent reply other threads:[~2002-01-03 16:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-01 7:32 Lars Magne Ingebrigtsen
2002-01-02 5:27 ` Russ Allbery
2002-01-03 13:25 ` Per Abrahamsen
2002-01-03 14:19 ` Lars Magne Ingebrigtsen
2002-01-03 14:22 ` Lars Magne Ingebrigtsen
2002-01-03 15:17 ` Lars Magne Ingebrigtsen
2002-01-03 15:20 ` Lars Magne Ingebrigtsen
2002-01-03 15:30 ` Per Abrahamsen
2002-01-03 16:25 ` Lars Magne Ingebrigtsen
2002-01-03 15:30 ` Russ Allbery
2002-01-03 16:27 ` Lars Magne Ingebrigtsen
2002-01-03 16:56 ` Michael Cook [this message]
2002-02-17 0:18 ` Russ Allbery
2002-02-18 1:22 ` Lars Magne Ingebrigtsen
2002-02-18 3:32 ` Russ Allbery
2002-02-18 17:28 ` Steinar Bang
2002-01-03 15:24 ` Per Abrahamsen
2002-01-03 15:25 ` ShengHuo ZHU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=g08pu4r4blv.fsf@zzz.cisco.com \
--to=michael.cook@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).