Show More
@@ -657,6 +657,9 b' coreconfigitem(' | |||||
657 | b'experimental', b'revisions.disambiguatewithin', default=None, |
|
657 | b'experimental', b'revisions.disambiguatewithin', default=None, | |
658 | ) |
|
658 | ) | |
659 | coreconfigitem( |
|
659 | coreconfigitem( | |
|
660 | b'experimental', b'rust.index', default=False, | |||
|
661 | ) | |||
|
662 | coreconfigitem( | |||
660 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, |
|
663 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, | |
661 | ) |
|
664 | ) | |
662 | coreconfigitem( |
|
665 | coreconfigitem( |
@@ -927,6 +927,9 b' def resolverevlogstorevfsoptions(ui, req' | |||||
927 | if repository.NARROW_REQUIREMENT in requirements: |
|
927 | if repository.NARROW_REQUIREMENT in requirements: | |
928 | options[b'enableellipsis'] = True |
|
928 | options[b'enableellipsis'] = True | |
929 |
|
929 | |||
|
930 | if ui.configbool('experimental', 'rust.index'): | |||
|
931 | options[b'rust.index'] = True | |||
|
932 | ||||
930 | return options |
|
933 | return options | |
931 |
|
934 | |||
932 |
|
935 |
@@ -106,6 +106,7 b' REVIDX_RAWTEXT_CHANGING_FLAGS' | |||||
106 | parsers = policy.importmod('parsers') |
|
106 | parsers = policy.importmod('parsers') | |
107 | rustancestor = policy.importrust('ancestor') |
|
107 | rustancestor = policy.importrust('ancestor') | |
108 | rustdagop = policy.importrust('dagop') |
|
108 | rustdagop = policy.importrust('dagop') | |
|
109 | rustrevlog = policy.importrust('revlog') | |||
109 |
|
110 | |||
110 | # Aliased for performance. |
|
111 | # Aliased for performance. | |
111 | _zlibdecompress = zlib.decompress |
|
112 | _zlibdecompress = zlib.decompress | |
@@ -351,6 +352,12 b' class revlogio(object):' | |||||
351 | return p |
|
352 | return p | |
352 |
|
353 | |||
353 |
|
354 | |||
|
355 | class rustrevlogio(revlogio): | |||
|
356 | def parseindex(self, data, inline): | |||
|
357 | index, cache = super(rustrevlogio, self).parseindex(data, inline) | |||
|
358 | return rustrevlog.MixedIndex(index), cache | |||
|
359 | ||||
|
360 | ||||
354 | class revlog(object): |
|
361 | class revlog(object): | |
355 | """ |
|
362 | """ | |
356 | the underlying revision storage object |
|
363 | the underlying revision storage object | |
@@ -585,6 +592,8 b' class revlog(object):' | |||||
585 | self._storedeltachains = True |
|
592 | self._storedeltachains = True | |
586 |
|
593 | |||
587 | self._io = revlogio() |
|
594 | self._io = revlogio() | |
|
595 | if rustrevlog is not None and self.opener.options.get('rust.index'): | |||
|
596 | self._io = rustrevlogio() | |||
588 | if self.version == REVLOGV0: |
|
597 | if self.version == REVLOGV0: | |
589 | self._io = revlogoldio() |
|
598 | self._io = revlogoldio() | |
590 | try: |
|
599 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now