comparison mercurial/revlogutils/constants.py @ 47249:130c9f7ed914

revlog: add a "data compression mode" entry in the index tuple That will make it possible to keep track of compression information in the revlog index, opening the way to more efficient revision restoration (in native code, but the python usage is already defeating performance work). We start with adding a new entry to the index tuple, using a value matching the current behavior. We will introduce storage and other value in later changesets. Differential Revision: https://phab.mercurial-scm.org/D10646
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 18:19:16 +0200
parents 616b8f412676
children 6bfa6c2c5f15
comparison
equal deleted inserted replaced
47248:013c645dd28c 47249:130c9f7ed914
1 # revlogdeltas.py - constant used for revlog logic 1 # revlogdeltas.py - constant used for revlog logic.
2 # 2 #
3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> 3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
4 # Copyright 2018 Octobus <contact@octobus.net> 4 # Copyright 2018 Octobus <contact@octobus.net>
5 # 5 #
6 # This software may be used and distributed according to the terms of the 6 # This software may be used and distributed according to the terms of the
112 ] 112 ]
113 113
114 # bitmark for flags that could cause rawdata content change 114 # bitmark for flags that could cause rawdata content change
115 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED 115 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED
116 116
117 ## chunk compression mode constants:
118 # These constants are used in revlog version >=2 to denote the compression used
119 # for a chunk.
120
121 # Chunk use a compression mode stored "inline" at the start of the chunk
122 # itself. This is the mode always used for revlog version "0" and "1"
123 COMP_MODE_INLINE = 2
124
117 SUPPORTED_FLAGS = { 125 SUPPORTED_FLAGS = {
118 REVLOGV0: REVLOGV0_FLAGS, 126 REVLOGV0: REVLOGV0_FLAGS,
119 REVLOGV1: REVLOGV1_FLAGS, 127 REVLOGV1: REVLOGV1_FLAGS,
120 REVLOGV2: REVLOGV2_FLAGS, 128 REVLOGV2: REVLOGV2_FLAGS,
121 } 129 }
150 b'sidedata': True, 158 b'sidedata': True,
151 b'docket': True, 159 b'docket': True,
152 }, 160 },
153 } 161 }
154 162
163
155 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 164 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000