mercurial/revlogutils/rewrite.py
branchstable
changeset 48245 531d26b1390a
parent 47821 c30ca163b45e
child 48277 96aa3a68d3b5
equal deleted inserted replaced
48081:690dbe1f07bf 48245:531d26b1390a
   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: