equal
deleted
inserted
replaced
587 try: |
587 try: |
588 raw_text = full_text() |
588 raw_text = full_text() |
589 except error.CensoredNodeError: |
589 except error.CensoredNodeError: |
590 # We don't care about censored nodes as they never carry metadata |
590 # We don't care about censored nodes as they never carry metadata |
591 return False |
591 return False |
592 has_meta = raw_text.startswith(b'\x01\n') |
592 |
|
593 # raw text can be a `memoryview`, which doesn't implement `startswith` |
|
594 has_meta = bytes(raw_text[:2]) == b'\x01\n' |
593 if metadata_cache is not None: |
595 if metadata_cache is not None: |
594 metadata_cache[filerev] = has_meta |
596 metadata_cache[filerev] = has_meta |
595 if has_meta: |
597 if has_meta: |
596 (p1, p2) = parents_revs() |
598 (p1, p2) = parents_revs() |
597 if p1 != nullrev and p2 == nullrev: |
599 if p1 != nullrev and p2 == nullrev: |