comparison mercurial/revlog.py @ 47263:6c84fc9c9a90

changelogv2: introduce a "changelogv2" feature Right now, this means using revlogv2, but only for the changelog. We will have the format more unique in future changesets. Differential Revision: https://phab.mercurial-scm.org/D10660
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 Mar 2021 22:40:54 +0200
parents 80164d50ae3d
children 921648d31553
comparison
equal deleted inserted replaced
47262:468e451fc0de 47263:6c84fc9c9a90
40 COMP_MODE_PLAIN, 40 COMP_MODE_PLAIN,
41 FEATURES_BY_VERSION, 41 FEATURES_BY_VERSION,
42 FLAG_GENERALDELTA, 42 FLAG_GENERALDELTA,
43 FLAG_INLINE_DATA, 43 FLAG_INLINE_DATA,
44 INDEX_HEADER, 44 INDEX_HEADER,
45 KIND_CHANGELOG,
45 REVLOGV0, 46 REVLOGV0,
46 REVLOGV1, 47 REVLOGV1,
47 REVLOGV1_FLAGS, 48 REVLOGV1_FLAGS,
48 REVLOGV2, 49 REVLOGV2,
49 REVLOGV2_FLAGS, 50 REVLOGV2_FLAGS,
456 force the usage of a "development" version of the nodemap code 457 force the usage of a "development" version of the nodemap code
457 """ 458 """
458 mmapindexthreshold = None 459 mmapindexthreshold = None
459 opts = self.opener.options 460 opts = self.opener.options
460 461
461 if b'revlogv2' in opts: 462 if b'changelogv2' in opts and self.revlog_kind == KIND_CHANGELOG:
463 new_header = REVLOGV2
464 elif b'revlogv2' in opts:
462 new_header = REVLOGV2 465 new_header = REVLOGV2
463 elif b'revlogv1' in opts: 466 elif b'revlogv1' in opts:
464 new_header = REVLOGV1 | FLAG_INLINE_DATA 467 new_header = REVLOGV1 | FLAG_INLINE_DATA
465 if b'generaldelta' in opts: 468 if b'generaldelta' in opts:
466 new_header |= FLAG_GENERALDELTA 469 new_header |= FLAG_GENERALDELTA