Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Oct 10 18:29:04 2023 +0200 +++ b/mercurial/revlog.py Thu Oct 12 17:41:06 2023 +0100 @@ -292,6 +292,9 @@ @staticmethod def is_inline_index(header_bytes): + if len(header_bytes) == 0: + return True + header = INDEX_HEADER.unpack(header_bytes)[0] _format_flags = header & ~0xFFFF