fixutf8 extension replaces util.posixfile with Python's file?
Adrian Buehlmann
adrian at cadifra.com
Mon Aug 1 06:39:42 CDT 2011
On 2011-08-01 11:18, Adrian Buehlmann wrote:
> (to: Stefan Rusek, cc-ing mercurial-devel)
>
> I'm just baffled to see that the fixutf8 extension seems to replace
> mercurial's util.posixfile with:
>
> class posixfile_utf8(file):
> def __init__(self, name, mode='rb'):
> super(posixfile_utf8, self).__init__(tounicode(name), mode)
> util.posixfile = posixfile_utf8
>
> https://bitbucket.org/stefanrusek/hg-fixutf8/src/baf283ab9f92/fixutf8.py#cl-164
>
> which extends Python's file ! (Do I understand this correctly ???)
>
> Near as I can tell, the fixutf8 extension is intended to be used on
> Windows and on Windows we specifically can't use Python's open (see
> [1]), so we created util.posixfile (implemented in osutil.posixfile for
> Windows, with a pure Python version in pure/osutil.py).
>
> [1] http://mercurial.selenic.com/wiki/UnlinkingFilesOnWindows
The fixutf8 extension looks pretty dead-ish anyway.
People seem to be forking away. Example:
https://bitbucket.org/mponomarenko/hg-fixutf8
More information about the Mercurial-devel
mailing list