diff mercurial/revlogutils/constants.py @ 47255:ff9fd7107d11

revlog: implement a "default compression" mode The revlog docker is now storing a default compression engine. When a chunk use that compression, a dedicated mode is used in the revlog entry and we can directly route it to the right decompressor. We should probably make PLAIN and DEFAULT mode the only available mode for revlogv2, but this is something for later. Differential Revision: https://phab.mercurial-scm.org/D10652
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 21:13:24 +0200
parents b876f0bf7366
children 921648d31553
line wrap: on
line diff
--- a/mercurial/revlogutils/constants.py	Mon May 03 21:04:55 2021 +0200
+++ b/mercurial/revlogutils/constants.py	Mon May 03 21:13:24 2021 +0200
@@ -123,6 +123,16 @@
 # chunk value. Without any header information prefixed.
 COMP_MODE_PLAIN = 0
 
+# Chunk use the "default compression" for the revlog (usually defined in the
+# revlog docket). A header is still used.
+#
+# XXX: keeping a header is probably not useful and we should probably drop it.
+#
+# XXX: The value of allow mixed type of compression in the revlog is unclear
+#      and we should consider making PLAIN/DEFAULT the only available mode for
+#      revlog v2, disallowing INLINE mode.
+COMP_MODE_DEFAULT = 1
+
 # Chunk use a compression mode stored "inline" at the start of the chunk
 # itself.  This is the mode always used for revlog version "0" and "1"
 COMP_MODE_INLINE = 2