Show More
@@ -74,8 +74,6 b' def _updatesample(dag, nodes, sample, al' | |||
|
74 | 74 | visit.append(p) |
|
75 | 75 | |
|
76 | 76 | def _setupsample(dag, nodes, size): |
|
77 | if len(nodes) <= size: | |
|
78 | return set(nodes), None, 0 | |
|
79 | 77 | always = dag.headsetofconnecteds(nodes) |
|
80 | 78 | desiredlen = size - len(always) |
|
81 | 79 | if desiredlen <= 0: |
@@ -205,8 +203,11 b' def findcommonheads(ui, local, remote,' | |||
|
205 | 203 | ui.debug("taking quick initial sample\n") |
|
206 | 204 | samplefunc = _takequicksample |
|
207 | 205 | targetsize = initialsamplesize |
|
208 |
|
|
|
209 | sample = _limitsample(sample, targetsize) | |
|
206 | if len(undecided) < targetsize: | |
|
207 | sample = list(undecided) | |
|
208 | else: | |
|
209 | sample = samplefunc(dag, undecided, targetsize) | |
|
210 | sample = _limitsample(sample, targetsize) | |
|
210 | 211 | |
|
211 | 212 | roundtrips += 1 |
|
212 | 213 | ui.progress(_('searching'), roundtrips, unit=_('queries')) |
General Comments 0
You need to be logged in to leave comments.
Login now