##// END OF EJS Templates
setdiscovery: avoid calling any sample building if the undecided set is small...
Pierre-Yves David -
r23808:07d0f59e default
parent child Browse files
Show More
@@ -74,8 +74,6 b' def _updatesample(dag, nodes, sample, al'
74 visit.append(p)
74 visit.append(p)
75
75
76 def _setupsample(dag, nodes, size):
76 def _setupsample(dag, nodes, size):
77 if len(nodes) <= size:
78 return set(nodes), None, 0
79 always = dag.headsetofconnecteds(nodes)
77 always = dag.headsetofconnecteds(nodes)
80 desiredlen = size - len(always)
78 desiredlen = size - len(always)
81 if desiredlen <= 0:
79 if desiredlen <= 0:
@@ -205,6 +203,9 b' def findcommonheads(ui, local, remote,'
205 ui.debug("taking quick initial sample\n")
203 ui.debug("taking quick initial sample\n")
206 samplefunc = _takequicksample
204 samplefunc = _takequicksample
207 targetsize = initialsamplesize
205 targetsize = initialsamplesize
206 if len(undecided) < targetsize:
207 sample = list(undecided)
208 else:
208 sample = samplefunc(dag, undecided, targetsize)
209 sample = samplefunc(dag, undecided, targetsize)
209 sample = _limitsample(sample, targetsize)
210 sample = _limitsample(sample, targetsize)
210
211
General Comments 0
You need to be logged in to leave comments. Login now