Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 51037:7d66621c5349
revlog: skip opener options to pass compression option values
We can directly set the option in the config object now.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Oct 2023 10:03:34 +0200 |
parents | 940445de2b09 |
children | 683b96c416d8 |
comparison
equal
deleted
inserted
replaced
51036:940445de2b09 | 51037:7d66621c5349 |
---|---|
626 elif b'revlogv0' in self.opener.options: | 626 elif b'revlogv0' in self.opener.options: |
627 new_header = REVLOGV0 | 627 new_header = REVLOGV0 |
628 else: | 628 else: |
629 new_header = REVLOG_DEFAULT_VERSION | 629 new_header = REVLOG_DEFAULT_VERSION |
630 | 630 |
631 comp_engine_opts = self.feature_config.compression_engine_options | |
632 if b'zlib.level' in opts: | |
633 comp_engine_opts[b'zlib.level'] = opts[b'zlib.level'] | |
634 if b'zstd.level' in opts: | |
635 comp_engine_opts[b'zstd.level'] = opts[b'zstd.level'] | |
636 if self._mmaplargeindex and b'mmapindexthreshold' in opts: | 631 if self._mmaplargeindex and b'mmapindexthreshold' in opts: |
637 mmapindexthreshold = opts[b'mmapindexthreshold'] | 632 mmapindexthreshold = opts[b'mmapindexthreshold'] |
638 self.data_config.mmap_index_threshold = mmapindexthreshold | 633 self.data_config.mmap_index_threshold = mmapindexthreshold |
639 if b'sparse-revlog' in opts: | 634 if b'sparse-revlog' in opts: |
640 self.delta_config.sparse_revlog = bool(opts[b'sparse-revlog']) | 635 self.delta_config.sparse_revlog = bool(opts[b'sparse-revlog']) |