##// END OF EJS Templates
parsers: use buffer to store revlog index...
parsers: use buffer to store revlog index Previously, the revlog index passed to parse_index2 must be a "string", which means we have to read the whole revlog index into memory. This patch makes the code accept a generic Py_buffer, to be more flexible - it could be a "string", or anything that implements the buffer interface, like a mmap-ed region. Note: ideally we want to remove the "data" field. However, it is still used in parse_index2: if (idx->inlined) { cache = Py_BuildValue("iO", 0, idx->data); .... } .... tuple = Py_BuildValue("NN", idx, cache); .... return tuple; Its only users are revlogio.parseindex and revlog.__init__: # revlogio.parseindex index, cache = parsers.parse_index2(data, inline) return index, getattr(index, 'nodemap', None), cache # revlog.__init__ d = self._io.parseindex(indexdata, self._inline) self.index, nodemap, self._chunkcache = d Maybe we could move the logic (testing inline and returnning "data" object) to revlog.py. But that should be a separate patch.
Jun Wu -
r30577:6146d5ac default
Show More
Name Size Modified Last Commit Author
contrib
doc
hgext
hgext3rd
i18n
mercurial
tests
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
CONTRIBUTING Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help

Running without installing:

$ make local # build for inplace usage
$ ./hg --version # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.