--- a/mercurial/revlog.py Sat May 22 00:06:22 2021 +0200
+++ b/mercurial/revlog.py Sun May 30 16:19:36 2021 +0200
@@ -72,6 +72,7 @@
mdiff,
policy,
pycompat,
+ revlogutils,
templatefilters,
util,
)
@@ -146,12 +147,6 @@
)
-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)
-
-
def _verify_revision(rl, skipflags, state, node):
"""Verify the integrity of the given revlog ``node`` while providing a hook
point for extensions to influence the operation."""
@@ -2590,7 +2585,7 @@
sidedata_offset = 0
e = (
- offset_type(offset, flags),
+ revlogutils.offset_type(offset, flags),
deltainfo.deltalen,
textlen,
deltainfo.base,