##// END OF EJS Templates
sidedata: register the flag processors if the repository allows for it...
marmoute -
r43305:142deb53 default
parent child Browse files
Show More
@@ -54,6 +54,7 b' from .revlogutils.flagutil import ('
54 54 REVIDX_FLAGS_ORDER,
55 55 REVIDX_ISCENSORED,
56 56 REVIDX_RAWTEXT_CHANGING_FLAGS,
57 REVIDX_SIDEDATA,
57 58 )
58 59 from .thirdparty import (
59 60 attr,
@@ -75,6 +76,7 b' from .interfaces import ('
75 76 from .revlogutils import (
76 77 deltas as deltautil,
77 78 flagutil,
79 sidedata as sidedatautil,
78 80 )
79 81 from .utils import (
80 82 storageutil,
@@ -95,6 +97,7 b' REVLOGV1_FLAGS'
95 97 REVLOGV2_FLAGS
96 98 REVIDX_ISCENSORED
97 99 REVIDX_ELLIPSIS
100 REVIDX_SIDEDATA
98 101 REVIDX_EXTSTORED
99 102 REVIDX_DEFAULT_FLAGS
100 103 REVIDX_FLAGS_ORDER
@@ -389,6 +392,8 b' class revlog(object):'
389 392 if self._mmaplargeindex and 'mmapindexthreshold' in opts:
390 393 mmapindexthreshold = opts['mmapindexthreshold']
391 394 self.hassidedata = bool(opts.get('side-data', False))
395 if self.hassidedata:
396 self._flagprocessors[REVIDX_SIDEDATA] = sidedatautil.processors
392 397 self._sparserevlog = bool(opts.get('sparse-revlog', False))
393 398 withsparseread = bool(opts.get('with-sparse-read', False))
394 399 # sparse-revlog forces sparse-read
@@ -17,6 +17,7 b' from .constants import ('
17 17 REVIDX_FLAGS_ORDER,
18 18 REVIDX_ISCENSORED,
19 19 REVIDX_RAWTEXT_CHANGING_FLAGS,
20 REVIDX_SIDEDATA,
20 21 )
21 22
22 23 from .. import (
@@ -29,6 +30,7 b' from .. import ('
29 30 REVIDX_ISCENSORED
30 31 REVIDX_ELLIPSIS
31 32 REVIDX_EXTSTORED
33 REVIDX_SIDEDATA
32 34 REVIDX_DEFAULT_FLAGS
33 35 REVIDX_FLAGS_ORDER
34 36 REVIDX_RAWTEXT_CHANGING_FLAGS
@@ -77,3 +77,9 b' def sidedatareadprocessor(rl, text):'
77 77 def sidedatarawprocessor(rl, text):
78 78 # side data modifies rawtext and prevent rawtext hash validation
79 79 return False
80
81 processors = (
82 sidedatareadprocessor,
83 sidedatawriteprocessor,
84 sidedatarawprocessor,
85 )
General Comments 0
You need to be logged in to leave comments. Login now