##// END OF EJS Templates
changelog-v2: add a configuration to disable rank computation...
marmoute -
r50558:45d7b8c3 default
parent child Browse files
Show More
@@ -923,6 +923,13 b' coreconfigitem('
923 b'changegroup4',
923 b'changegroup4',
924 default=False,
924 default=False,
925 )
925 )
926
927 # might remove rank configuration once the computation has no impact
928 coreconfigitem(
929 b'experimental',
930 b'changelog-v2.compute-rank',
931 default=True,
932 )
926 coreconfigitem(
933 coreconfigitem(
927 b'experimental',
934 b'experimental',
928 b'cleanup-as-archived',
935 b'cleanup-as-archived',
@@ -1068,6 +1068,8 b' def resolverevlogstorevfsoptions(ui, req'
1068 options[b'revlogv2'] = True
1068 options[b'revlogv2'] = True
1069 if requirementsmod.CHANGELOGV2_REQUIREMENT in requirements:
1069 if requirementsmod.CHANGELOGV2_REQUIREMENT in requirements:
1070 options[b'changelogv2'] = True
1070 options[b'changelogv2'] = True
1071 cmp_rank = ui.configbool(b'experimental', b'changelog-v2.compute-rank')
1072 options[b'changelogv2.compute-rank'] = cmp_rank
1071
1073
1072 if requirementsmod.GENERALDELTA_REQUIREMENT in requirements:
1074 if requirementsmod.GENERALDELTA_REQUIREMENT in requirements:
1073 options[b'generaldelta'] = True
1075 options[b'generaldelta'] = True
@@ -365,6 +365,11 b' class revlog:'
365 self._srdensitythreshold = 0.50
365 self._srdensitythreshold = 0.50
366 self._srmingapsize = 262144
366 self._srmingapsize = 262144
367
367
368 # other optionnals features
369
370 # might remove rank configuration once the computation has no impact
371 self._compute_rank = False
372
368 # Make copy of flag processors so each revlog instance can support
373 # Make copy of flag processors so each revlog instance can support
369 # custom flags.
374 # custom flags.
370 self._flagprocessors = dict(flagutil.flagprocessors)
375 self._flagprocessors = dict(flagutil.flagprocessors)
@@ -406,6 +411,7 b' class revlog:'
406
411
407 if b'changelogv2' in opts and self.revlog_kind == KIND_CHANGELOG:
412 if b'changelogv2' in opts and self.revlog_kind == KIND_CHANGELOG:
408 new_header = CHANGELOGV2
413 new_header = CHANGELOGV2
414 self._compute_rank = opts.get(b'changelogv2.compute-rank', True)
409 elif b'revlogv2' in opts:
415 elif b'revlogv2' in opts:
410 new_header = REVLOGV2
416 new_header = REVLOGV2
411 elif b'revlogv1' in opts:
417 elif b'revlogv1' in opts:
@@ -2499,7 +2505,7 b' class revlog:'
2499 sidedata_offset = 0
2505 sidedata_offset = 0
2500
2506
2501 rank = RANK_UNKNOWN
2507 rank = RANK_UNKNOWN
2502 if self._format_version == CHANGELOGV2:
2508 if self._compute_rank:
2503 if (p1r, p2r) == (nullrev, nullrev):
2509 if (p1r, p2r) == (nullrev, nullrev):
2504 rank = 1
2510 rank = 1
2505 elif p1r != nullrev and p2r == nullrev:
2511 elif p1r != nullrev and p2r == nullrev:
General Comments 0
You need to be logged in to leave comments. Login now