.arcconfig
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 21 Feb 2018 13:41:20 -0800
changeset 36362 01e29e885600
parent 33583 b2c27d84f05c
child 44128 ff396501e841
permissions -rw-r--r--
util: add a file object proxy that can read at most N bytes Sometimes we have data of a known size within a stream. For performance reasons, we don't want to pre-read this data (we want to allow consumers to read on demand). For simplicitly reasons, we don't want callers to necessarily know their data is coming from within an outer stream and there is a limit to how much they should read. The class introduced by this commit provides a very simple proxy around an underlying file object that allows the consumer to .read() up to N bytes from the file object. Attempts to read past this many bytes results in a simulated EOF. Differential Revision: https://phab.mercurial-scm.org/D2377

{
    "conduit_uri": "https://phab.mercurial-scm.org/api",
    "repository.callsign": "HG",
    "arc.land.onto.default": "@",
    "base": "hg:.^"
}