[PATCH 1 of 3 RFC] scmutil: support background file closing
Bryan O'Sullivan
bos at serpentine.com
Mon Jan 4 13:11:52 CST 2016
On Sat, Jan 2, 2016 at 7:15 PM, Gregory Szorc <gregory.szorc at gmail.com>
wrote:
> def __call__(self, path, mode="r", text=False, atomictemp=False,
> - notindexed=False):
> + notindexed=False, filecloser=None):
> '''Open ``path`` file, which is relative to vfs root.
>
> Newly created directories are marked as "not to be indexed by
> the content indexing service", if ``notindexed`` is specified
> for "write" mode access.
> +
> + If ``filecloser`` is passed, it will be used to close the
> + opened file. ``filecloser`` only works if the file is being
> + used as a context manager.
>
This comment is a bit misleading, as filecloser will only be used on
Windows. That futher suggests to me that filecloser shouldn't even be made
available to callers, as it's purely an OS-specific workaround.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20160104/e3a57873/attachment.html>
More information about the Mercurial-devel
mailing list