Show More
@@ -146,7 +146,7 b' def _takefullsample(repo, headrevs, revs' | |||||
146 | _updatesample(revs, revsroots, sample, children.__getitem__) |
|
146 | _updatesample(revs, revsroots, sample, children.__getitem__) | |
147 | assert sample |
|
147 | assert sample | |
148 | sample = _limitsample(sample, size) |
|
148 | sample = _limitsample(sample, size) | |
149 | if len(sample) < size: |
|
149 | if len(sample) <= size: | |
150 | more = size - len(sample) |
|
150 | more = size - len(sample) | |
151 | sample.update(random.sample(list(revs - sample), more)) |
|
151 | sample.update(random.sample(list(revs - sample), more)) | |
152 | return sample |
|
152 | return sample | |
@@ -264,7 +264,7 b' def findcommonheads(ui, local, remote,' | |||||
264 | ui.debug("taking quick initial sample\n") |
|
264 | ui.debug("taking quick initial sample\n") | |
265 | samplefunc = _takequicksample |
|
265 | samplefunc = _takequicksample | |
266 | targetsize = initialsamplesize |
|
266 | targetsize = initialsamplesize | |
267 | if len(undecided) < targetsize: |
|
267 | if len(undecided) <= targetsize: | |
268 | sample = list(undecided) |
|
268 | sample = list(undecided) | |
269 | else: |
|
269 | else: | |
270 | sample = samplefunc(local, ownheads, undecided, targetsize) |
|
270 | sample = samplefunc(local, ownheads, undecided, targetsize) |
General Comments 0
You need to be logged in to leave comments.
Login now