# HG changeset patch # User Gregory Szorc # Date 2019-01-10 00:14:09 # Node ID d0de4fdd87aad15e958b3b8f29f47fed3c6fa331 # Parent e7a2cc84dbc00deacaef6d4f13d6334c10a6903e revlog: store mmaplargeindex as an instance attribute This makes it more consistent with everything else. It also makes it possible to move the opener/features processing into _loadindex(). Differential Revision: https://phab.mercurial-scm.org/D5562 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -352,6 +352,7 @@ class revlog(object): # When True, indexfile is opened with checkambig=True at writing, to # avoid file stat ambiguity. self._checkambig = checkambig + self._mmaplargeindex = mmaplargeindex self._censorable = censorable # 3-tuple of (node, rev, text) for a raw revision. self._revisioncache = None @@ -406,7 +407,7 @@ class revlog(object): self._compengine = opts['compengine'] if 'maxdeltachainspan' in opts: self._maxdeltachainspan = opts['maxdeltachainspan'] - if mmaplargeindex and 'mmapindexthreshold' in opts: + if self._mmaplargeindex and 'mmapindexthreshold' in opts: mmapindexthreshold = opts['mmapindexthreshold'] self._sparserevlog = bool(opts.get('sparse-revlog', False)) withsparseread = bool(opts.get('with-sparse-read', False))