##// END OF EJS Templates
setdiscovery: rearrange code deciding if we will grow the sample...
marmoute -
r47561:f1651054 default
parent child Browse files
Show More
@@ -429,13 +429,12 b' def findcommonheads('
429 # full blown discovery
429 # full blown discovery
430
430
431 # if the server has a limit to its arguments size, we can't grow the sample.
431 # if the server has a limit to its arguments size, we can't grow the sample.
432 hard_limit_sample = remote.limitedarguments
433 grow_sample = local.ui.configbool(b'devel', b'discovery.grow-sample')
432 grow_sample = local.ui.configbool(b'devel', b'discovery.grow-sample')
434 hard_limit_sample = hard_limit_sample and grow_sample
433 grow_sample = grow_sample and not remote.limitedarguments
435
434
436 randomize = ui.configbool(b'devel', b'discovery.randomize')
435 randomize = ui.configbool(b'devel', b'discovery.randomize')
437 disco = partialdiscovery(
436 disco = partialdiscovery(
438 local, ownheads, hard_limit_sample, randomize=randomize
437 local, ownheads, not grow_sample, randomize=randomize
439 )
438 )
440 if initial_head_exchange:
439 if initial_head_exchange:
441 # treat remote heads (and maybe own heads) as a first implicit sample
440 # treat remote heads (and maybe own heads) as a first implicit sample
@@ -454,7 +453,7 b' def findcommonheads('
454 ui.debug(b"taking initial sample\n")
453 ui.debug(b"taking initial sample\n")
455 samplefunc = disco.takefullsample
454 samplefunc = disco.takefullsample
456 targetsize = fullsamplesize
455 targetsize = fullsamplesize
457 if not hard_limit_sample:
456 if grow_sample:
458 fullsamplesize = int(fullsamplesize * samplegrowth)
457 fullsamplesize = int(fullsamplesize * samplegrowth)
459 else:
458 else:
460 # use even cheaper initial sample
459 # use even cheaper initial sample
General Comments 0
You need to be logged in to leave comments. Login now