[PATCH] osutil: introduce a posixfile type for Unix

Matt Mackall mpm at selenic.com
Mon Apr 16 16:25:20 CDT 2012


On Mon, 2012-04-16 at 14:01 -0700, Bryan O'Sullivan wrote:
> 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.

We actually handle .d files offsets up to 48 bits or so. But individual
file revisions ares limited to 31 bits at present.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list