Hey Jason,
I found your posting online about the default project used by
commit-email.pl. Since I didn't configure that function, it had a blank
from_address and hostname, which was causing my problems. I ended up
initializing the project array to be empty and have the script evocation
explicitly list the projects.
Thanks,
Andy
Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
afelle1@lsu.edu
(office) 225.578.3737
-----Original Message-----
From: Jason Forkey [mailto:jason@forkey.net]
Sent: Wednesday, May 09, 2007 11:16 AM
To: users@subversion.tigris.org
Subject: Re: Issue specifying hostname in commit-email.pl; regex bug?
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.
http://www.nabble.com/commit-email.pl-hook-script-broken-when-using--m-s
witch-t3681480.html
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 9 19:09:49 2007