--- a/mercurial/revlogutils/revlogv0.py Sat May 22 00:06:22 2021 +0200
+++ b/mercurial/revlogutils/revlogv0.py Sun May 30 16:19:36 2021 +0200
@@ -18,6 +18,7 @@
error,
node,
pycompat,
+ revlogutils,
util,
)
@@ -35,12 +36,6 @@
return int(q & 0xFFFF)
-def offset_type(offset, type):
- if (type & ~flagutil.REVIDX_KNOWN_FLAGS) != 0:
- raise ValueError(b'unknown revlog index flags')
- return int(int(offset) << 16 | type)
-
-
class revlogoldindex(list):
rust_ext_compat = 0
entry_size = INDEX_ENTRY_V0.size
@@ -143,7 +138,7 @@
e = INDEX_ENTRY_V0.unpack(cur)
# transform to revlogv1 format
e2 = (
- offset_type(e[0], 0),
+ revlogutils.offset_type(e[0], 0),
e[1],
-1,
e[2],