[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: Sat, 16 Jan 2021 22:04:30 +0900

On 2021/01/15 7:30, Stefan Sperling wrote:
> On Fri, Jan 15, 2021 at 01:44:43AM +0900, Yasuhito FUTATSUKI wrote:
>> 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.
>
> Yes, in my opinion this patch is OK.
> The mailer.py test is still passing and your changes look fine to me.
>
> Thank you! My experience with python2/3 conversion is limited, and your
> help with this is much appreciated.

I committed it in r1885557. Perhaps If you did not commit r1884427,
I didn't work for it so quickly (yes, even this is quickly). Thank you.

Then I'll go ahead to resolve above issues.

Cheers,

-- 
Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>
Received on 2021-01-16 14:06:18 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.