Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 47267:2b69555e4875
revlog: introduce a compression mode for sidedata in the revlog index
We will use this for compression for the sidedata payload.
Differential Revision: https://phab.mercurial-scm.org/D10653
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 21:34:02 +0200 |
parents | ff9fd7107d11 |
children | 87d057137f82 |
line wrap: on
line diff
--- a/mercurial/revlog.py Mon May 03 21:13:24 2021 +0200 +++ b/mercurial/revlog.py Mon May 03 21:34:02 2021 +0200 @@ -345,6 +345,9 @@ (see "COMP_MODE_*" constants for details). For revlog version 0 and 1 this will always be COMP_MODE_INLINE. + [11] side-data compression mode: + two bits that detail the way the sidedata chunk is compressed on disk. + (see "COMP_MODE_*" constants for details) """ _flagserrorclass = error.RevlogError @@ -2517,7 +2520,9 @@ compression_mode = COMP_MODE_PLAIN deltainfo = deltautil.drop_u_compression(deltainfo) + sidedata_compression_mode = COMP_MODE_INLINE if sidedata and self.hassidedata: + sidedata_compression_mode = COMP_MODE_PLAIN serialized_sidedata = sidedatautil.serialize_sidedata(sidedata) sidedata_offset = offset + deltainfo.deltalen else: @@ -2539,6 +2544,7 @@ sidedata_offset, len(serialized_sidedata), compression_mode, + sidedata_compression_mode, ) self.index.append(e)