Mercurial > hg
comparison mercurial/revlog.py @ 47270:25ce16bf724b
changelogv2: use a dedicated on disk format for changelogv2
We drop two unused entry. This is mostly a proof of concept before starting to
actually rework the format.
Differential Revision: https://phab.mercurial-scm.org/D10667
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 04 May 2021 11:20:10 +0200 |
parents | 6be2a7ca4b1d |
children | 21ed126bab53 |
comparison
equal
deleted
inserted
replaced
47269:6be2a7ca4b1d | 47270:25ce16bf724b |
---|---|
225 # call the C implementation to parse the index data | 225 # call the C implementation to parse the index data |
226 index, cache = parsers.parse_index2(data, inline, revlogv2=True) | 226 index, cache = parsers.parse_index2(data, inline, revlogv2=True) |
227 return index, cache | 227 return index, cache |
228 | 228 |
229 | 229 |
230 def parse_index_cl_v2(data, inline): | |
231 # call the C implementation to parse the index data | |
232 assert not inline | |
233 from .pure.parsers import parse_index_cl_v2 | |
234 | |
235 index, cache = parse_index_cl_v2(data) | |
236 return index, cache | |
237 | |
238 | |
230 if util.safehasattr(parsers, 'parse_index_devel_nodemap'): | 239 if util.safehasattr(parsers, 'parse_index_devel_nodemap'): |
231 | 240 |
232 def parse_index_v1_nodemap(data, inline): | 241 def parse_index_v1_nodemap(data, inline): |
233 index, cache = parsers.parse_index_devel_nodemap(data, inline) | 242 index, cache = parsers.parse_index_devel_nodemap(data, inline) |
234 return index, cache | 243 return index, cache |
650 if self._format_version == REVLOGV0: | 659 if self._format_version == REVLOGV0: |
651 self._parse_index = revlogv0.parse_index_v0 | 660 self._parse_index = revlogv0.parse_index_v0 |
652 elif self._format_version == REVLOGV2: | 661 elif self._format_version == REVLOGV2: |
653 self._parse_index = parse_index_v2 | 662 self._parse_index = parse_index_v2 |
654 elif self._format_version == CHANGELOGV2: | 663 elif self._format_version == CHANGELOGV2: |
655 self._parse_index = parse_index_v2 | 664 self._parse_index = parse_index_cl_v2 |
656 elif devel_nodemap: | 665 elif devel_nodemap: |
657 self._parse_index = parse_index_v1_nodemap | 666 self._parse_index = parse_index_v1_nodemap |
658 elif use_rust_index: | 667 elif use_rust_index: |
659 self._parse_index = parse_index_v1_mixed | 668 self._parse_index = parse_index_v1_mixed |
660 try: | 669 try: |