Show More
@@ -923,6 +923,13 b' coreconfigitem(' | |||
|
923 | 923 | b'changegroup4', |
|
924 | 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 | 933 | coreconfigitem( |
|
927 | 934 | b'experimental', |
|
928 | 935 | b'cleanup-as-archived', |
@@ -1068,6 +1068,8 b' def resolverevlogstorevfsoptions(ui, req' | |||
|
1068 | 1068 | options[b'revlogv2'] = True |
|
1069 | 1069 | if requirementsmod.CHANGELOGV2_REQUIREMENT in requirements: |
|
1070 | 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 | 1074 | if requirementsmod.GENERALDELTA_REQUIREMENT in requirements: |
|
1073 | 1075 | options[b'generaldelta'] = True |
@@ -365,6 +365,11 b' class revlog:' | |||
|
365 | 365 | self._srdensitythreshold = 0.50 |
|
366 | 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 | 373 | # Make copy of flag processors so each revlog instance can support |
|
369 | 374 | # custom flags. |
|
370 | 375 | self._flagprocessors = dict(flagutil.flagprocessors) |
@@ -406,6 +411,7 b' class revlog:' | |||
|
406 | 411 | |
|
407 | 412 | if b'changelogv2' in opts and self.revlog_kind == KIND_CHANGELOG: |
|
408 | 413 | new_header = CHANGELOGV2 |
|
414 | self._compute_rank = opts.get(b'changelogv2.compute-rank', True) | |
|
409 | 415 | elif b'revlogv2' in opts: |
|
410 | 416 | new_header = REVLOGV2 |
|
411 | 417 | elif b'revlogv1' in opts: |
@@ -2499,7 +2505,7 b' class revlog:' | |||
|
2499 | 2505 | sidedata_offset = 0 |
|
2500 | 2506 | |
|
2501 | 2507 | rank = RANK_UNKNOWN |
|
2502 | if self._format_version == CHANGELOGV2: | |
|
2508 | if self._compute_rank: | |
|
2503 | 2509 | if (p1r, p2r) == (nullrev, nullrev): |
|
2504 | 2510 | rank = 1 |
|
2505 | 2511 | elif p1r != nullrev and p2r == nullrev: |
General Comments 0
You need to be logged in to leave comments.
Login now