equal
deleted
inserted
replaced
34 ## revlog version |
34 ## revlog version |
35 REVLOGV0 = 0 |
35 REVLOGV0 = 0 |
36 REVLOGV1 = 1 |
36 REVLOGV1 = 1 |
37 # Dummy value until file format is finalized. |
37 # Dummy value until file format is finalized. |
38 REVLOGV2 = 0xDEAD |
38 REVLOGV2 = 0xDEAD |
|
39 # Dummy value until file format is finalized. |
|
40 CHANGELOGV2 = 0xD34D |
39 |
41 |
40 ## global revlog header flags |
42 ## global revlog header flags |
41 # Shared across v1 and v2. |
43 # Shared across v1 and v2. |
42 FLAG_INLINE_DATA = 1 << 16 |
44 FLAG_INLINE_DATA = 1 << 16 |
43 # Only used by v1, implied by v2. |
45 # Only used by v1, implied by v2. |
46 REVLOG_DEFAULT_FORMAT = REVLOGV1 |
48 REVLOG_DEFAULT_FORMAT = REVLOGV1 |
47 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
49 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
48 REVLOGV0_FLAGS = 0 |
50 REVLOGV0_FLAGS = 0 |
49 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA |
51 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA |
50 REVLOGV2_FLAGS = FLAG_INLINE_DATA |
52 REVLOGV2_FLAGS = FLAG_INLINE_DATA |
|
53 CHANGELOGV2_FLAGS = 0 |
51 |
54 |
52 ### individual entry |
55 ### individual entry |
53 |
56 |
54 ## index v0: |
57 ## index v0: |
55 # 4 bytes: offset |
58 # 4 bytes: offset |
139 |
142 |
140 SUPPORTED_FLAGS = { |
143 SUPPORTED_FLAGS = { |
141 REVLOGV0: REVLOGV0_FLAGS, |
144 REVLOGV0: REVLOGV0_FLAGS, |
142 REVLOGV1: REVLOGV1_FLAGS, |
145 REVLOGV1: REVLOGV1_FLAGS, |
143 REVLOGV2: REVLOGV2_FLAGS, |
146 REVLOGV2: REVLOGV2_FLAGS, |
|
147 CHANGELOGV2: CHANGELOGV2_FLAGS, |
144 } |
148 } |
145 |
149 |
146 _no = lambda flags: False |
150 _no = lambda flags: False |
147 _yes = lambda flags: True |
151 _yes = lambda flags: True |
148 |
152 |
171 b'inline': _no, |
175 b'inline': _no, |
172 b'generaldelta': _yes, |
176 b'generaldelta': _yes, |
173 b'sidedata': True, |
177 b'sidedata': True, |
174 b'docket': True, |
178 b'docket': True, |
175 }, |
179 }, |
|
180 CHANGELOGV2: { |
|
181 b'inline': _no, |
|
182 # General delta is useless for changelog since we don't do any delta |
|
183 b'generaldelta': _no, |
|
184 b'sidedata': True, |
|
185 b'docket': True, |
|
186 }, |
176 } |
187 } |
177 |
188 |
178 |
189 |
179 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 |
190 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 |