discovery: re-adjust a conditional wrongly changed
authorBoris Feld <boris.feld@octobus.net>
Thu, 10 Jan 2019 04:35:48 +0100
changeset 41162 cc1f545c4075
parent 41161 98ce494e104d
child 41163 0101a35deae2
discovery: re-adjust a conditional wrongly changed In 71b0db4fa027 we updated this conditional to `<=`. As Yuya Nishihara pointed out, this was wrong.
mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py	Mon Jan 07 18:43:10 2019 -0500
+++ b/mercurial/setdiscovery.py	Thu Jan 10 04:35:48 2019 +0100
@@ -150,7 +150,7 @@
     _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