Show More
@@ -54,6 +54,7 b' from .revlogutils.flagutil import (' | |||||
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, | |
@@ -75,6 +76,7 b' from .interfaces import (' | |||||
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, | |
@@ -95,6 +97,7 b' 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 | |
@@ -389,6 +392,8 b' class revlog(object):' | |||||
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 |
@@ -17,6 +17,7 b' from .constants import (' | |||||
17 | REVIDX_FLAGS_ORDER, |
|
17 | REVIDX_FLAGS_ORDER, | |
18 | REVIDX_ISCENSORED, |
|
18 | REVIDX_ISCENSORED, | |
19 | REVIDX_RAWTEXT_CHANGING_FLAGS, |
|
19 | REVIDX_RAWTEXT_CHANGING_FLAGS, | |
|
20 | REVIDX_SIDEDATA, | |||
20 | ) |
|
21 | ) | |
21 |
|
22 | |||
22 | from .. import ( |
|
23 | from .. import ( | |
@@ -29,6 +30,7 b' from .. import (' | |||||
29 | REVIDX_ISCENSORED |
|
30 | REVIDX_ISCENSORED | |
30 | REVIDX_ELLIPSIS |
|
31 | REVIDX_ELLIPSIS | |
31 | REVIDX_EXTSTORED |
|
32 | REVIDX_EXTSTORED | |
|
33 | REVIDX_SIDEDATA | |||
32 | REVIDX_DEFAULT_FLAGS |
|
34 | REVIDX_DEFAULT_FLAGS | |
33 | REVIDX_FLAGS_ORDER |
|
35 | REVIDX_FLAGS_ORDER | |
34 | REVIDX_RAWTEXT_CHANGING_FLAGS |
|
36 | REVIDX_RAWTEXT_CHANGING_FLAGS |
@@ -77,3 +77,9 b' def sidedatareadprocessor(rl, text):' | |||||
77 | def sidedatarawprocessor(rl, text): |
|
77 | def sidedatarawprocessor(rl, text): | |
78 | # side data modifies rawtext and prevent rawtext hash validation |
|
78 | # side data modifies rawtext and prevent rawtext hash validation | |
79 | return False |
|
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