[PATCH] osutil: introduce a posixfile type for Unix

Bryan O'Sullivan bos at serpentine.com
Mon Apr 16 16:01:52 CDT 2012


On Mon, Apr 16, 2012 at 11:41 AM, Antoine Pitrou <solipsis at pitrou.net>wrote:

>
> How about multi-threaded hgweb setups (using e.g. mod_wsgi)?
>

Unlikely to be an issue.


> - you miss readline()


Not missing, since it's not used anywhere that the tests touch. My goal was
to get the test suite to pass, not to implement parts of the file API that
Mercurial doesn't seem to use :-)


> - iter() reads the whole file into memory
>

Intentionally so.


> - there's a reference leak on the `str` variable in readlines()
>

Good catch, thanks.


> - the code probably doesn't deal well with large files (> 2**31 bytes)
>  in 32-bit Pythons
>

To be fair, I can't imaging Mercurial working at all in such cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120416/fa40c31d/attachment.html>


More information about the Mercurial-devel mailing list