[PATCH] windows: switch the console encoding into an encoding actually used (issue2926)
Andrei Polushin
polushin at gmail.com
Fri Jul 29 00:20:29 UTC 2011
29.07.2011 7:00, Adrian Buehlmann wrote:
> On 2011-07-29 01:26, Andrei Polushin wrote:
>> Probably, I need help to do it in a non-natural way. Is it worth the effort?
>> Looks like Mercurial already has plaform-specific C code anyway.
>>
>> I plan to leave C code in osutil.c and call it from the windows-specific
>> extension. Could it be done this way?
>
> It could, but for newer things we prefer not adding C code just to call
> a few Windows API's. Mercurial on Windows now depends on ctypes.
>
> I could help you by adding basic infrastructure in win32.py. It's not
> that difficult. You could then call that in your extension.
Well, I'm not sure. My concern is that the problem with redirection is not
finally solved. If someone knows how to solve it and wishes to send a patch,
I don't want him to have an additional barrier.
win32.py is hardly maintainable, it is neither a C code, nor a natural
Python code. It could prevent someone experimenting with code. Probably,
this approach suits well when you solution is rather stable.
> Or you can use ctypes right in your extension. For example, the color
> extension which is maintained by the Mercurial project uses ctypes too
> [1]. I could help you doing that as well.
Let's wait for opinions from others.
--
Andrei Polushin
More information about the Mercurial-devel
mailing list