Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
43036:e8bc4c3d9a0b | 43037:142deb539ccf |
---|---|
52 REVIDX_ELLIPSIS, | 52 REVIDX_ELLIPSIS, |
53 REVIDX_EXTSTORED, | 53 REVIDX_EXTSTORED, |
54 REVIDX_FLAGS_ORDER, | 54 REVIDX_FLAGS_ORDER, |
55 REVIDX_ISCENSORED, | 55 REVIDX_ISCENSORED, |
56 REVIDX_RAWTEXT_CHANGING_FLAGS, | 56 REVIDX_RAWTEXT_CHANGING_FLAGS, |
57 REVIDX_SIDEDATA, | |
57 ) | 58 ) |
58 from .thirdparty import ( | 59 from .thirdparty import ( |
59 attr, | 60 attr, |
60 ) | 61 ) |
61 from . import ( | 62 from . import ( |
73 util as interfaceutil, | 74 util as interfaceutil, |
74 ) | 75 ) |
75 from .revlogutils import ( | 76 from .revlogutils import ( |
76 deltas as deltautil, | 77 deltas as deltautil, |
77 flagutil, | 78 flagutil, |
79 sidedata as sidedatautil, | |
78 ) | 80 ) |
79 from .utils import ( | 81 from .utils import ( |
80 storageutil, | 82 storageutil, |
81 stringutil, | 83 stringutil, |
82 ) | 84 ) |
93 REVLOG_DEFAULT_VERSION | 95 REVLOG_DEFAULT_VERSION |
94 REVLOGV1_FLAGS | 96 REVLOGV1_FLAGS |
95 REVLOGV2_FLAGS | 97 REVLOGV2_FLAGS |
96 REVIDX_ISCENSORED | 98 REVIDX_ISCENSORED |
97 REVIDX_ELLIPSIS | 99 REVIDX_ELLIPSIS |
100 REVIDX_SIDEDATA | |
98 REVIDX_EXTSTORED | 101 REVIDX_EXTSTORED |
99 REVIDX_DEFAULT_FLAGS | 102 REVIDX_DEFAULT_FLAGS |
100 REVIDX_FLAGS_ORDER | 103 REVIDX_FLAGS_ORDER |
101 REVIDX_RAWTEXT_CHANGING_FLAGS | 104 REVIDX_RAWTEXT_CHANGING_FLAGS |
102 | 105 |
387 if 'maxdeltachainspan' in opts: | 390 if 'maxdeltachainspan' in opts: |
388 self._maxdeltachainspan = opts['maxdeltachainspan'] | 391 self._maxdeltachainspan = opts['maxdeltachainspan'] |
389 if self._mmaplargeindex and 'mmapindexthreshold' in opts: | 392 if self._mmaplargeindex and 'mmapindexthreshold' in opts: |
390 mmapindexthreshold = opts['mmapindexthreshold'] | 393 mmapindexthreshold = opts['mmapindexthreshold'] |
391 self.hassidedata = bool(opts.get('side-data', False)) | 394 self.hassidedata = bool(opts.get('side-data', False)) |
395 if self.hassidedata: | |
396 self._flagprocessors[REVIDX_SIDEDATA] = sidedatautil.processors | |
392 self._sparserevlog = bool(opts.get('sparse-revlog', False)) | 397 self._sparserevlog = bool(opts.get('sparse-revlog', False)) |
393 withsparseread = bool(opts.get('with-sparse-read', False)) | 398 withsparseread = bool(opts.get('with-sparse-read', False)) |
394 # sparse-revlog forces sparse-read | 399 # sparse-revlog forces sparse-read |
395 self._withsparseread = self._sparserevlog or withsparseread | 400 self._withsparseread = self._sparserevlog or withsparseread |
396 if 'sparse-read-density-threshold' in opts: | 401 if 'sparse-read-density-threshold' in opts: |