##// END OF EJS Templates
discovery: add a `devel', b'discovery.grow-sample`...
marmoute -
r47017:397e39ad default
parent child Browse files
Show More
@@ -700,6 +700,13 b' coreconfigitem('
700 700 b'debug.peer-request',
701 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 710 # If discovery.randomize is False, random sampling during discovery are
704 711 # deterministic. It is meant for integration tests.
705 712 coreconfigitem(
@@ -418,9 +418,14 b' def findcommonheads('
418 418
419 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 426 randomize = ui.configbool(b'devel', b'discovery.randomize')
422 427 disco = partialdiscovery(
423 local, ownheads, remote.limitedarguments, randomize=randomize
428 local, ownheads, hard_limit_sample, randomize=randomize
424 429 )
425 430 # treat remote heads (and maybe own heads) as a first implicit sample
426 431 # response
@@ -438,7 +443,7 b' def findcommonheads('
438 443 ui.debug(b"taking initial sample\n")
439 444 samplefunc = disco.takefullsample
440 445 targetsize = fullsamplesize
441 if not remote.limitedarguments:
446 if not hard_limit_sample:
442 447 fullsamplesize = int(fullsamplesize * samplegrowth)
443 448 else:
444 449 # use even cheaper initial sample
General Comments 0
You need to be logged in to leave comments. Login now