Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 43037:142deb539ccf
sidedata: register the flag processors if the repository allows for it
Differential Revision: https://phab.mercurial-scm.org/D6893
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 04 Sep 2019 03:20:55 +0200 |
parents | 294afb982a88 |
children | 7bb5a2465501 |
line wrap: on
line diff
--- a/mercurial/revlog.py Wed Sep 04 03:19:58 2019 +0200 +++ b/mercurial/revlog.py Wed Sep 04 03:20:55 2019 +0200 @@ -54,6 +54,7 @@ REVIDX_FLAGS_ORDER, REVIDX_ISCENSORED, REVIDX_RAWTEXT_CHANGING_FLAGS, + REVIDX_SIDEDATA, ) from .thirdparty import ( attr, @@ -75,6 +76,7 @@ from .revlogutils import ( deltas as deltautil, flagutil, + sidedata as sidedatautil, ) from .utils import ( storageutil, @@ -95,6 +97,7 @@ REVLOGV2_FLAGS REVIDX_ISCENSORED REVIDX_ELLIPSIS +REVIDX_SIDEDATA REVIDX_EXTSTORED REVIDX_DEFAULT_FLAGS REVIDX_FLAGS_ORDER @@ -389,6 +392,8 @@ if self._mmaplargeindex and 'mmapindexthreshold' in opts: mmapindexthreshold = opts['mmapindexthreshold'] self.hassidedata = bool(opts.get('side-data', False)) + if self.hassidedata: + self._flagprocessors[REVIDX_SIDEDATA] = sidedatautil.processors self._sparserevlog = bool(opts.get('sparse-revlog', False)) withsparseread = bool(opts.get('with-sparse-read', False)) # sparse-revlog forces sparse-read