comparison tests/test-parseindex2.py @ 48769:1bb62821f080

revlog: register changelogv2 C implementation in parsers This allows Python code to make use of the C implementation of the changelogv2 base operations when the C extensions are enabled. The `format_version` values are now shared between the C and Python sides, avoiding an additional translation for the selection of the format version to use. Differential Revision: https://phab.mercurial-scm.org/D12179
author pacien <pacien.trangirard@pacien.net>
date Mon, 07 Feb 2022 13:23:58 +0100
parents 52034c42c09d
children 6000f5b25c9b
comparison
equal deleted inserted replaced
48768:7dd5a2c0116a 48769:1bb62821f080
132 b'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' 132 b'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00'
133 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00' 133 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00'
134 ) 134 )
135 135
136 136
137 def parse_index2(data, inline, revlogv2=False): 137 def parse_index2(data, inline, format=constants.REVLOGV1):
138 index, chunkcache = parsers.parse_index2(data, inline, revlogv2=revlogv2) 138 index, chunkcache = parsers.parse_index2(data, inline, format=format)
139 return list(index), chunkcache 139 return list(index), chunkcache
140 140
141 141
142 def importparsers(hexversion): 142 def importparsers(hexversion):
143 """Import mercurial.parsers with the given sys.hexversion.""" 143 """Import mercurial.parsers with the given sys.hexversion."""