Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 50789:74c004a515bc stable
stream-clone: fix a crash when a repo with an empty revlog is cloned
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Thu, 12 Oct 2023 17:41:06 +0100 |
parents | 4a3a9d961561 |
children | 2dec23658969 |
comparison
equal
deleted
inserted
replaced
50788:704c3d0878d9 | 50789:74c004a515bc |
---|---|
290 | 290 |
291 _flagserrorclass = error.RevlogError | 291 _flagserrorclass = error.RevlogError |
292 | 292 |
293 @staticmethod | 293 @staticmethod |
294 def is_inline_index(header_bytes): | 294 def is_inline_index(header_bytes): |
295 if len(header_bytes) == 0: | |
296 return True | |
297 | |
295 header = INDEX_HEADER.unpack(header_bytes)[0] | 298 header = INDEX_HEADER.unpack(header_bytes)[0] |
296 | 299 |
297 _format_flags = header & ~0xFFFF | 300 _format_flags = header & ~0xFFFF |
298 _format_version = header & 0xFFFF | 301 _format_version = header & 0xFFFF |
299 | 302 |