Show More
@@ -700,6 +700,13 b' coreconfigitem(' | |||||
700 | b'debug.peer-request', |
|
700 | b'debug.peer-request', | |
701 | default=False, |
|
701 | default=False, | |
702 | ) |
|
702 | ) | |
|
703 | # If discovery.grow-sample is False, the sample size used in set discovery will | |||
|
704 | # not be increased through the process | |||
|
705 | coreconfigitem( | |||
|
706 | b'devel', | |||
|
707 | b'discovery.grow-sample', | |||
|
708 | default=True, | |||
|
709 | ) | |||
703 | # If discovery.randomize is False, random sampling during discovery are |
|
710 | # If discovery.randomize is False, random sampling during discovery are | |
704 | # deterministic. It is meant for integration tests. |
|
711 | # deterministic. It is meant for integration tests. | |
705 | coreconfigitem( |
|
712 | coreconfigitem( |
@@ -418,9 +418,14 b' def findcommonheads(' | |||||
418 |
|
418 | |||
419 | # full blown discovery |
|
419 | # full blown discovery | |
420 |
|
420 | |||
|
421 | # if the server has a limit to its arguments size, we can't grow the sample. | |||
|
422 | hard_limit_sample = remote.limitedarguments | |||
|
423 | grow_sample = local.ui.configbool(b'devel', b'discovery.grow-sample') | |||
|
424 | hard_limit_sample = hard_limit_sample and grow_sample | |||
|
425 | ||||
421 | randomize = ui.configbool(b'devel', b'discovery.randomize') |
|
426 | randomize = ui.configbool(b'devel', b'discovery.randomize') | |
422 | disco = partialdiscovery( |
|
427 | disco = partialdiscovery( | |
423 |
local, ownheads, |
|
428 | local, ownheads, hard_limit_sample, randomize=randomize | |
424 | ) |
|
429 | ) | |
425 | # treat remote heads (and maybe own heads) as a first implicit sample |
|
430 | # treat remote heads (and maybe own heads) as a first implicit sample | |
426 | # response |
|
431 | # response | |
@@ -438,7 +443,7 b' def findcommonheads(' | |||||
438 | ui.debug(b"taking initial sample\n") |
|
443 | ui.debug(b"taking initial sample\n") | |
439 | samplefunc = disco.takefullsample |
|
444 | samplefunc = disco.takefullsample | |
440 | targetsize = fullsamplesize |
|
445 | targetsize = fullsamplesize | |
441 |
if not |
|
446 | if not hard_limit_sample: | |
442 | fullsamplesize = int(fullsamplesize * samplegrowth) |
|
447 | fullsamplesize = int(fullsamplesize * samplegrowth) | |
443 | else: |
|
448 | else: | |
444 | # use even cheaper initial sample |
|
449 | # use even cheaper initial sample |
General Comments 0
You need to be logged in to leave comments.
Login now