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

Re: Subversion commit email script and "unprintable" characters

From: Alfred von Campe <alfred_at_von-campe.com>
Date: Wed, 13 Jan 2016 20:54:12 -0500

Thanks for that pointer. I’ve started to look into the new script, and noticed it has an accompanying config file. However, I would like to be able to specify some parameters on the command line because they vary with each commit. For instance, this is how I call the the old Perl script from our post-commit hook:

    $COMMONDIR/commit-email.pl -r $USEREMAIL --diff n -s "$SUBJECT" $REPOSITORY $REVISION $EMAIL

That is, I like to set the Reply-To: address (-r) to the user who made the commit, I set a customized Subject line based on the branch name, commit revision and username (-s), and the email list is set from a file that is checked into the repo and accessed via svnlook.

Does the new Python script also support command line options or must everything be configured via the config file? Is there any documentation for this script (other than the script itself)?

Alfred

> On Jan 13, 2016, at 11:52, Ryan Schmidt <subversion-2015_at_ryandesign.com> wrote:
>
>
> On Jan 13, 2016, at 9:27 AM, Alfred von Campe wrote:
>>
>> We are using a (very old) commit-email.pl script to send out email notifications from a post-commit hook on our Linux server running Subversion 1.7.5. Lately I’ve noticed some emails that contain lots of “unprintable” characters. Here is a snippet from a recent commit:
>>
>> If it?\226?\128?\153s nil, I set to false.
>>
>> This is happening mostly from Mac clients. Running “svn log” from the command line on Linux and Windows shows the check-in comment correctly, but not from a Mac client ironically. This leads me to believe that the log is stored correctly on the server but that the commit-email.pl is script is not properly sending it out. I assume this is an issue with not properly encoding TF. So my questions are:
>>
>> 1. Where can I find the latest version of the commit-email.pl script and does it fix this issue?
>> 2. If not, what is the current recommended script to use to send email notifications from a post-commit hook?
>
> The current version of commit-email.pl is here:
>
> http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/commit-email.pl.in
>
> As it says at the top:
>
> # This script is deprecated. The Subversion developers recommend
> # using mailer.py for post-commit and post-revprop change
> # notifications. If you wish to improve or add features to a
> # post-commit notification script, please do that work on mailer.py.
> # See http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer .
>
>
Received on 2016-01-14 02:54:37 CET

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.