Patchwork D2645: setdiscovery: remove unnecessary sample size limiting

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 4:58 p.m.
Message ID <differential-rev-PHID-DREV-7pvgm5um5ay5pdm2duge-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28933/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 4:58 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Both _takequicksample() and _takefullsample() already limit their
  result to the request size, so there's no need to let the caller do
  that again.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2645

AFFECTED FILES
  mercurial/setdiscovery.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -221,7 +221,6 @@ 
             sample = list(undecided)
         else:
             sample = samplefunc(dag, undecided, targetsize)
-            sample = _limitsample(sample, targetsize)
 
         roundtrips += 1
         ui.progress(_('searching'), roundtrips, unit=_('queries'))