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-switch-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
Received on Wed May 9 18:16:49 2007