##// END OF EJS Templates
discovery: new devel.discovery.randomize option...
Georges Racinet -
r42969:334c1ea5 default
parent child Browse files
Show More
@@ -415,6 +415,9 b" coreconfigitem('devel', 'debug.extension"
415 415 coreconfigitem('devel', 'debug.peer-request',
416 416 default=False,
417 417 )
418 coreconfigitem('devel', 'discovery.randomize',
419 default=True,
420 )
418 421 _registerdiffopts(section='diff')
419 422 coreconfigitem('email', 'bcc',
420 423 default=None,
@@ -390,7 +390,9 b' def findcommonheads(ui, local, remote,'
390 390
391 391 # full blown discovery
392 392
393 disco = partialdiscovery(local, ownheads, remote.limitedarguments)
393 randomize = ui.configbool('devel', 'discovery.randomize')
394 disco = partialdiscovery(local, ownheads, remote.limitedarguments,
395 randomize=randomize)
394 396 # treat remote heads (and maybe own heads) as a first implicit sample
395 397 # response
396 398 disco.addcommons(knownsrvheads)
@@ -968,7 +968,7 b' One with >200 heads. We now switch to se'
968 968 updating to branch b
969 969 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
970 970
971 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true
971 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --config devel.discovery.randomize=false
972 972 comparing with b
973 973 query 1; heads
974 974 searching for changes
@@ -980,13 +980,14 b' One with >200 heads. We now switch to se'
980 980 query 3; still undecided: 980, sample size is: 200
981 981 sampling from both directions
982 982 searching: 4 queries
983 query 4; still undecided: 435, sample size is: 210 (no-py3 !)
984 query 4; still undecided: 430, sample size is: 210 (py3 !)
983 query 4; still undecided: 497, sample size is: 210
985 984 sampling from both directions
986 985 searching: 5 queries
987 query 5; still undecided: 185, sample size is: 185 (no-py3 !)
988 query 5; still undecided: 187, sample size is: 187 (py3 !)
989 5 total queries in *.????s (glob)
986 query 5; still undecided: 285, sample size is: 220
987 sampling from both directions
988 searching: 6 queries
989 query 6; still undecided: 63, sample size is: 63
990 6 total queries in *.????s (glob)
990 991 elapsed time: * seconds (glob)
991 992 heads summary:
992 993 total common heads: 1
@@ -1095,16 +1096,9 b" The case where all the 'initialsamplesiz"
1095 1096 give 'all remote heads known locally' without checking the remaining heads -
1096 1097 fixed in 86c35b7ae300:
1097 1098
1098 $ cat >> $TESTTMP/unrandomsample.py << EOF
1099 > import random
1100 > def sample(population, k):
1101 > return sorted(population)[:k]
1102 > random.sample = sample
1103 > EOF
1104
1105 1099 $ cat >> r1/.hg/hgrc << EOF
1106 > [extensions]
1107 > unrandomsample = $TESTTMP/unrandomsample.py
1100 > [devel]
1101 > discovery.randomize = False
1108 1102 > EOF
1109 1103
1110 1104 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
General Comments 0
You need to be logged in to leave comments. Login now