##// END OF EJS Templates
revlog: compress sidedata in `_writeentry`...
marmoute -
r48032:c4dbb763 default
parent child Browse files
Show More
@@ -2537,6 +2537,22 b' class revlog(object):'
2537 sidedata_compression_mode = COMP_MODE_PLAIN
2537 sidedata_compression_mode = COMP_MODE_PLAIN
2538 serialized_sidedata = sidedatautil.serialize_sidedata(sidedata)
2538 serialized_sidedata = sidedatautil.serialize_sidedata(sidedata)
2539 sidedata_offset = offset + deltainfo.deltalen
2539 sidedata_offset = offset + deltainfo.deltalen
2540 h, comp_sidedata = self.compress(serialized_sidedata)
2541 if (
2542 h != b'u'
2543 and comp_sidedata[0:1] != b'\0'
2544 and len(comp_sidedata) < len(serialized_sidedata)
2545 ):
2546 assert not h
2547 if (
2548 comp_sidedata[0:1]
2549 == self._docket.default_compression_header
2550 ):
2551 sidedata_compression_mode = COMP_MODE_DEFAULT
2552 serialized_sidedata = comp_sidedata
2553 else:
2554 sidedata_compression_mode = COMP_MODE_INLINE
2555 serialized_sidedata = comp_sidedata
2540 else:
2556 else:
2541 serialized_sidedata = b""
2557 serialized_sidedata = b""
2542 # Don't store the offset if the sidedata is empty, that way
2558 # Don't store the offset if the sidedata is empty, that way
General Comments 0
You need to be logged in to leave comments. Login now