Mercurial > public > mercurial-scm > hg
diff mercurial/revlogutils/rewrite.py @ 48277:96aa3a68d3b5
branching: merge stable into default
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 21 Oct 2021 17:25:41 +0200 |
parents | 2174f54aab18 531d26b1390a |
children | a52aae8bcc7a |
line wrap: on
line diff
--- a/mercurial/revlogutils/rewrite.py Thu Oct 21 11:21:21 2021 +0200 +++ b/mercurial/revlogutils/rewrite.py Thu Oct 21 17:25:41 2021 +0200 @@ -589,7 +589,9 @@ except error.CensoredNodeError: # We don't care about censored nodes as they never carry metadata return False - has_meta = raw_text.startswith(b'\x01\n') + + # raw text can be a `memoryview`, which doesn't implement `startswith` + has_meta = bytes(raw_text[:2]) == b'\x01\n' if metadata_cache is not None: metadata_cache[filerev] = has_meta if has_meta: