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

Re: svn commit: r1884427 - in /subversion/trunk/tools/hook-scripts/mailer: mailer.py tests/mailer-t1.output tests/mailer-tweak.py

From: Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>
Date: Fri, 15 Jan 2021 01:44:43 +0900

On 2020/12/29 0:49, Stefan Sperling wrote:
> On Tue, Dec 15, 2020 at 07:47:59PM +0900, Yasuhito FUTATSUKI wrote:
>> As far as I read the code again, it seems this is already support
>> locales other than C/C.UTF-8 if mailer.py is kicked with appropriate
>> LC_CTYPE environment. The REPOS-PATH argment comes from sys.argv[2]
>> already decoded in file system encoding (i.e. encoding corresponding
>> to LC_CTYPE) and Python encodes it if access to file system. On the
>> other hand, svn.repos.open() wrapper function accepts str and encode
>> it to UTF-8 string, as the svn_repos_open() C API expects.
>> Then I overlooked sys.argv[x] and cmd_args[x] in main() are
>> already str.
>> Perhaps it needs (although the last hunk is not nessesary):
> Yes, indeed. If python already encodes arguments to strings then this
> patch looks correct to me. It also works as expected in my testing.
I revised the patch and checked in UTF-8 locale. Now it seems it works
with post-revprop-change, post-lock and post-unlock hooks.

If this patch is OK, then I'll do:

(1) Make it support Python 2 again, to merge it to 1.14.x.
(2) Fix an issue to encode Unicode paths in Subject header.
(3) Fix an issue of max line length in Subject header.

Perhaps (2) and (3) will be resolved at the same time.


Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>

Received on 2021-01-14 17:46:36 CET

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

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