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

Re: Issue specifying hostname in commit-email.pl; regex bug?

From: Jason Forkey <jason_at_forkey.net>
Date: 2007-05-09 18:16:24 CEST

At Wed, 9 May 2007 09:45:45 -0500,
"Andrew R Feller" <afelle1@lsu.edu> wrote:
> While trying to use the commit-email.pl script, I was having issues
> specifying the hostname to be appended to the author information
> (lsu.edu). Whenever the script ran, it would complain that the hostname
> argument (-h <hostname>) wasn't missing. After looking into the source
> code, I noticed the regular expressions used; they want the hostname to
> be a single character?!
> The following snippet is from the CollabNet's 1.4.3 tag of
> commit-email.pl. The latest version from trunk has the same code as
> well.
> (http://svn.collab.net/repos/svn/tags/1.4.3/tools/hook-scripts/mailer/ma
> iler.py)
> ========================================================================
> if ($from_address =~ /\w/)
> {
> $mail_from = $from_address;
> }
> elsif ($hostname =~ /\w/)
> {
> $mail_from = "$mail_from\@$hostname";
> }
> elsif (defined $smtp_server)
> {
> die "$0: use of either `-h' or `--from' is mandatory when ",
> "sending email using direct SMTP.\n";
> }
> ========================================================================
> Does anyone know if I am missing something or is this a legitimate bug?

That particular regular expression will match if there is a word character
anywhere in the hostname. It doesn't have to be only one character, /^\w$/

Perhaps you are running in to the same problem I saw.

What is the exact command line you are executing in the post-commit hook? What
is the exact error message that is returned?

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 9 18:16:49 2007

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

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