diff -r e06d1a779eb6 -r 3b56395404a1 mercurial/revlog.py --- a/mercurial/revlog.py Tue May 30 17:43:59 2023 +0100 +++ b/mercurial/revlog.py Wed May 31 10:37:55 2023 +0100 @@ -290,6 +290,16 @@ _flagserrorclass = error.RevlogError + @staticmethod + def is_inline_index(header_bytes): + header = INDEX_HEADER.unpack(header_bytes)[0] + + _format_flags = header & ~0xFFFF + _format_version = header & 0xFFFF + + features = FEATURES_BY_VERSION[_format_version] + return features[b'inline'](_format_flags) + def __init__( self, opener,