[PATCH FOLLOW-UP] discovery: re-adjust a conditional wrongly changed
Boris Feld
boris.feld at octobus.net
Thu Jan 10 08:54:36 UTC 2019
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1547091348 -3600
# Thu Jan 10 04:35:48 2019 +0100
# Node ID 1914c8346174a7c204e5623684cbff5188a3e847
# Parent 17a1956764728e8c9dd1101573dca12523e482bb
# EXP-Topic discovery-followup
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 1914c8346174
discovery: re-adjust a conditional wrongly changed
In 71b0db4fa027 we updated this conditional to `<=`. As Yuya Nishihara pointed
out, this was wrong.
diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -150,7 +150,7 @@ def _takefullsample(repo, headrevs, revs
_updatesample(revs, revsroots, sample, children.__getitem__)
assert sample
sample = _limitsample(sample, size)
- if len(sample) <= size:
+ if len(sample) < size:
more = size - len(sample)
sample.update(random.sample(list(revs - sample), more))
return sample
More information about the Mercurial-devel
mailing list